Can Guo 7bbac19e60 scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback
[ Upstream commit 35fc4cd34426c242ab015ef280853b7bff101f48 ]

Users can initiate resets to specific SCSI device/target/host through
IOCTL. When this happens, the SCSI cmd passed to eh_device/target/host
_reset_handler() callbacks is initialized with a request whose tag is -1.
In this case it is not right for eh_device_reset_handler() callback to
count on the LUN get from hba->lrb[-1]. Fix it by getting LUN from the SCSI
device associated with the SCSI cmd.

Link: https://lore.kernel.org/r/1609157080-26283-1-git-send-email-cang@codeaurora.org
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-30 13:27:14 +01:00
..
2020-12-29 13:44:50 +01:00
2016-07-20 17:38:35 -06:00
2015-04-27 10:10:19 -07:00
2015-04-27 10:04:39 -07:00
2015-04-27 10:05:55 -07:00
2015-04-17 10:13:56 -07:00
2015-11-25 22:08:55 -05:00
2016-02-23 21:27:02 -05:00
2016-05-10 22:01:07 -04:00
2015-11-09 16:32:14 -08:00
2016-10-07 09:28:53 -07:00
2017-12-20 10:07:22 +01:00
2016-02-25 21:10:53 -05:00
2019-11-28 18:28:23 +01:00
2016-01-27 20:36:10 +08:00
2016-01-27 20:36:10 +08:00
2016-09-26 20:49:25 -04:00
2014-11-24 20:01:28 +01:00
2016-02-23 21:27:02 -05:00
2016-11-28 15:51:31 -05:00
2016-10-07 09:28:53 -07:00
2016-02-23 21:27:02 -05:00
2015-11-18 11:59:09 -05:00
2016-02-23 21:27:02 -05:00