Files
linux/drivers
Adrian Hunter f4b3d35dfa FROMLIST: scsi: ufs: Fix task management completion
The UFS driver uses blk_mq_tagset_busy_iter() when identifying task
management requests to complete, however blk_mq_tagset_busy_iter()
doesn't work.

blk_mq_tagset_busy_iter() only iterates requests dispatched by the block
layer. That appears as if it might have started since commit 37f4a24c24
("blk-mq: centralise related handling into blk_mq_get_driver_tag") which
removed 'data->hctx->tags->rqs[rq->tag] = rq' from blk_mq_rq_ctx_init()
which gets called:

	blk_get_request
		blk_mq_alloc_request
			__blk_mq_alloc_request
				blk_mq_rq_ctx_init

Since UFS task management requests are not dispatched by the block
layer, hctx->tags->rqs[rq->tag] remains NULL,  and since
blk_mq_tagset_busy_iter() relies on finding requests using
hctx->tags->rqs[rq->tag], UFS task management requests are never found by
blk_mq_tagset_busy_iter().

By using blk_mq_tagset_busy_iter(), the UFS driver was relying on internal
details of the block layer, which was fragile and subsequently got
broken. Fix by removing the use of blk_mq_tagset_busy_iter() and having
the driver keep track of task management requests.

Fixes: 1235fc569e ("scsi: ufs: core: Fix task management request completion timeout")
Fixes: 69a6c269c0 ("scsi: ufs: Use blk_{get,put}_request() to allocate and free TMFs")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Bug: 200291871
Link: https://lore.kernel.org/linux-scsi/20210922091059.4040-1-adrian.hunter@intel.com/
Change-Id: I4e11f40c7371fd66b3a6b570d06c956b113df142
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-04 18:29:27 +00:00
..
2021-06-12 14:48:14 +02:00
2021-03-07 12:33:33 +01:00
2021-05-14 09:50:24 +02:00
2021-06-03 18:47:38 +02:00
2021-06-03 18:47:38 +02:00
2021-06-03 18:47:38 +02:00
2021-06-12 14:48:14 +02:00
2021-06-12 14:48:14 +02:00
2021-06-12 14:48:14 +02:00
2021-03-04 11:38:21 +01:00
2021-05-22 15:34:48 +02:00
2021-05-15 09:28:55 +02:00
2021-06-03 18:47:38 +02:00
2021-03-07 12:33:33 +01:00
2021-05-20 15:35:25 +02:00
2021-05-15 09:28:55 +02:00
2021-05-20 15:35:25 +02:00
2021-05-20 15:35:25 +02:00
2021-05-27 08:36:46 +02:00
2021-06-03 18:47:38 +02:00
2021-05-15 09:28:55 +02:00
2021-06-03 18:47:38 +02:00
2021-06-12 14:48:14 +02:00
2021-06-12 14:48:14 +02:00
2021-05-27 08:36:46 +02:00