Skip to content

Fix UFS task management command timeout

Po-Wen Kao linux-block linux-scsi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2blk-mq: new busy request iterator for driverblock/blk-mq-tag.c include/linux/blk-mq.h+34 -61 reply
2/2scsi: ufs: fix TM request timeoutdrivers/scsi/ufs/ufshcd.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Fix UFS task management command timeout

On UTP_TASK_REQ_COMPL interrupt, ufshcd_tmc_handler() iterates through busy requests in tags->rqs and complete request if corresponding doorbell flag is reset.
However, ufshcd_issue_tm_cmd() allocates requests from tags->static_rqs and trigger doorbell directly without dispatching request through block layer, thus requests can never be found in tags->rqs and completed properly. Any TM command issued by ufshcd_issue_tm_cmd() inevitably timeout and further leads to recovery flow failure when LU Reset or Abort Task is issued.

In this patch, blk_mq_tagset_busy_iter() call in ufshcd_tmc_handler() is replaced with new interface, blk_mq_drv_tagset_busy_iter(), to allow completion of request allocted by driver. The new interface is introduced for driver to iterate through requests in static_rqs.

Po-Wen Kao (2):
blk-mq: new busy request iterator for driver
scsi: ufs: fix TM request timeout

 block/blk-mq-tag.c        | 36 ++++++++++++++++++++++++++++++------
 drivers/scsi/ufs/ufshcd.c |  2 +-
 include/linux/blk-mq.h    |  4 ++++
 3 files changed, 35 insertions(+), 7 deletions(-)
Signature · 1 line
2.18.0