Adrian Hunter
f5ef336fd2
scsi: ufs: core: 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.
Link: https://lore.kernel.org/r/20210922091059.4040-1-adrian.hunter@intel.com
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
Tested-by: Bart Van Assche <bvanassche@acm.org >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-04 22:03:17 -04:00
..
2021-08-11 22:25:38 -04:00
2021-07-11 10:59:53 -07:00
2021-07-11 10:59:53 -07:00
2021-06-18 23:26:33 -04:00
2021-10-04 21:54:18 -04:00
2021-07-18 21:19:14 -04:00
2021-05-21 17:01:18 -04:00
2021-07-11 10:59:53 -07:00
2021-08-11 22:25:38 -04:00
2021-09-28 23:26:42 -04:00
2021-08-13 17:49:05 -07:00
2021-09-07 19:13:42 -07:00
2021-07-29 21:58:35 -04:00
2020-03-11 23:07:59 -04:00
2021-09-13 22:15:46 -04:00
2021-06-02 01:37:04 -04:00
2021-06-07 21:30:09 -04:00
2021-08-16 13:33:24 -04:00
2021-08-11 22:25:39 -04:00
2021-08-17 22:28:40 -04:00
2021-06-10 13:09:16 +01:00
2021-08-11 22:25:43 -04:00
2021-06-28 22:31:16 -04:00
2021-08-11 22:25:39 -04:00
2021-09-22 00:16:38 -04:00
2021-09-13 22:15:50 -04:00
2021-08-24 22:56:33 -04:00
2021-09-13 22:15:51 -04:00
2021-06-22 23:00:02 -04:00
2021-08-09 23:30:25 -04:00
2021-08-11 22:37:22 -04:00
2021-08-16 13:27:57 -04:00
2021-08-16 13:27:57 -04:00
2021-09-28 22:49:25 -04:00
2021-08-11 22:25:41 -04:00
2021-08-17 22:28:39 -04:00
2021-08-24 22:56:32 -04:00
2021-08-11 22:25:42 -04:00
2021-10-04 22:03:17 -04:00
2020-03-25 11:50:48 +01:00
2021-05-31 23:59:18 -04:00
2021-05-15 18:01:34 -04:00
2021-03-18 22:18:09 -04:00
2021-01-22 21:14:08 -05:00
2021-05-31 23:59:18 -04:00
2021-01-22 21:14:07 -05:00
2021-08-11 22:25:38 -04:00
2021-05-07 00:26:34 -07:00
2021-03-29 23:33:06 -04:00
2020-06-09 09:39:13 -07:00
2020-06-09 09:39:13 -07:00
2019-05-21 10:50:45 +02:00
2021-08-11 22:25:38 -04:00
2021-05-31 22:48:23 -04:00
2021-08-11 22:25:38 -04:00
2021-01-13 00:14:07 -05:00
2021-06-18 23:27:04 -04:00
2019-05-21 10:50:45 +02:00
2020-11-23 22:12:09 -05:00
2021-03-15 22:29:00 -04:00
2021-01-22 21:14:08 -05:00
2021-08-01 13:27:46 -04:00
2021-05-14 22:19:04 -04:00
2019-05-21 10:50:45 +02:00
2021-07-28 22:24:25 -04:00
2021-06-02 23:09:39 -04:00
2021-05-31 22:48:22 -04:00
2021-01-22 21:14:10 -05:00
2019-05-24 17:36:45 +02:00
2021-08-11 22:25:38 -04:00
2020-03-11 23:07:59 -04:00
2021-05-31 22:48:21 -04:00
2019-12-19 22:08:51 -05:00
2021-01-26 07:42:27 +01:00
2019-06-18 19:46:18 -04:00
2021-05-31 22:48:24 -04:00
2020-07-08 01:12:44 -04:00
2021-06-02 01:37:04 -04:00
2021-01-26 07:42:27 +01:00
2020-06-09 09:39:13 -07:00
2021-07-12 21:46:24 -04:00
2021-04-01 22:52:40 -04:00
2021-08-11 22:25:39 -04:00
2020-09-02 22:49:06 -04:00
2021-05-31 22:48:21 -04:00
2019-06-05 17:36:37 +02:00
2021-06-18 23:01:03 -04:00
2021-03-18 23:35:55 -04:00
2021-01-22 21:14:10 -05:00
2021-06-29 16:46:08 -04:00
2021-06-29 16:46:08 -04:00
2021-08-11 22:25:39 -04:00
2021-05-07 00:26:34 -07:00
2020-06-02 21:23:47 -04:00
2021-06-02 01:28:20 -04:00
2019-05-30 11:26:37 -07:00
2021-04-13 00:20:48 -04:00
2021-07-28 22:24:27 -04:00
2021-08-30 10:18:25 +02:00
2021-02-08 22:39:03 -05:00
2021-06-02 01:37:04 -04:00
2021-03-24 22:16:12 -04:00
2020-10-02 21:52:53 -04:00
2020-12-07 20:24:09 -05:00
2021-08-23 23:07:05 -04:00
2021-05-31 23:59:18 -04:00
2021-05-31 22:48:23 -04:00
2019-05-21 10:50:45 +02:00
2020-06-09 09:39:13 -07:00
2021-08-11 22:25:40 -04:00
2020-03-11 23:07:56 -04:00
2021-08-11 22:25:40 -04:00
2020-01-02 21:57:44 -05:00
2021-08-11 22:25:40 -04:00
2020-01-02 21:57:44 -05:00
2021-09-13 22:15:47 -04:00
2021-01-22 21:14:12 -05:00
2021-08-11 22:25:38 -04:00
2020-12-07 20:24:09 -05:00
2021-05-31 22:48:23 -04:00
2019-05-24 17:39:02 +02:00
2021-03-18 23:35:55 -04:00
2021-05-21 16:59:33 -04:00
2021-06-18 23:01:03 -04:00
2021-05-31 22:48:21 -04:00
2021-08-23 23:06:56 -04:00
2020-01-15 23:09:11 -05:00
2021-05-31 22:48:23 -04:00
2021-08-11 22:25:41 -04:00
2019-06-05 17:37:17 +02:00
2019-05-24 17:36:45 +02:00
2021-08-01 13:21:40 -04:00
2021-07-28 22:24:27 -04:00
2021-09-02 15:09:46 -07:00
2021-04-06 09:28:17 -06:00
2019-05-21 06:16:21 -04:00
2021-07-21 23:49:02 -04:00
2021-03-24 23:03:43 -04:00
2021-08-11 22:25:42 -04:00
2021-08-24 22:56:32 -04:00
2021-08-17 22:28:39 -04:00
2021-08-11 22:25:37 -04:00
2019-12-19 22:08:54 -05:00
2019-05-30 11:26:35 -07:00
2020-07-24 22:09:55 -04:00
2021-07-30 22:22:36 -04:00
2020-02-04 03:05:26 +00:00
2021-08-11 22:37:22 -04:00
2019-05-30 11:29:53 -07:00
2021-09-02 15:09:46 -07:00
2020-03-16 22:08:36 -04:00
2021-08-11 22:25:37 -04:00
2021-09-13 22:15:43 -04:00
2021-05-31 22:48:20 -04:00
2021-08-11 22:25:37 -04:00
2021-04-05 23:14:53 -04:00
2021-08-11 22:25:37 -04:00
2021-05-06 19:24:11 -07:00
2019-06-05 17:37:14 +02:00
2021-09-21 23:52:55 -04:00
2021-09-14 00:07:37 -04:00
2020-10-14 15:15:35 -07:00
2020-09-15 20:28:06 -04:00
2021-09-28 22:42:06 -04:00
2021-09-02 15:09:46 -07:00
2020-09-25 06:20:44 +02:00
2021-03-18 22:52:29 -04:00
2021-05-07 00:26:34 -07:00
2021-09-13 22:15:49 -04:00
2020-02-24 14:59:01 -05:00
2021-09-02 15:09:46 -07:00
2020-02-24 15:01:57 -05:00
2021-09-13 22:15:39 -04:00
2021-08-23 12:54:30 -06:00
2021-08-11 22:25:41 -04:00
2021-09-02 15:09:46 -07:00
2021-08-11 22:25:41 -04:00
2021-04-13 00:20:48 -04:00
2020-10-02 21:52:55 -04:00
2021-09-28 22:47:28 -04:00
2021-07-02 15:14:36 -07:00
2021-03-04 17:21:25 -05:00
2021-05-31 22:48:23 -04:00
2019-05-24 17:39:02 +02:00
2021-08-16 13:33:24 -04:00
2021-08-11 22:25:42 -04:00
2021-08-30 10:18:25 +02:00
2019-05-21 10:50:45 +02:00
2020-06-09 09:39:13 -07:00