FROMGIT: 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> Bug: 177042238 (cherry picked from commit 35fc4cd3 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git 5.11/scsi-fixes) Change-Id: I7bd7602581b97f76442e179b5264ee2891d923a9 Signed-off-by:
Can Guo <cang@codeaurora.org>
Loading
Please sign in to comment