Commit 35fc4cd
scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback
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>1 parent 6948a96 commit 35fc4cd
1 file changed
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6659 | 6659 | | |
6660 | 6660 | | |
6661 | 6661 | | |
6662 | | - | |
6663 | 6662 | | |
6664 | 6663 | | |
6665 | | - | |
6666 | | - | |
| 6664 | + | |
6667 | 6665 | | |
6668 | 6666 | | |
6669 | 6667 | | |
6670 | 6668 | | |
6671 | | - | |
6672 | 6669 | | |
6673 | | - | |
6674 | | - | |
| 6670 | + | |
| 6671 | + | |
6675 | 6672 | | |
6676 | 6673 | | |
6677 | 6674 | | |
| |||
6680 | 6677 | | |
6681 | 6678 | | |
6682 | 6679 | | |
6683 | | - | |
| 6680 | + | |
6684 | 6681 | | |
6685 | 6682 | | |
6686 | 6683 | | |
| |||
0 commit comments