diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2016-03-07 05:59:44 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-03-08 20:58:31 -0500 |
commit | ff06c5ffbcb4ffa542fb80c897be977956fafecc (patch) | |
tree | b5c40e4ad036146cc957ddb5bb6935b1525664b5 | |
parent | 84bd64993f916bcf86270c67686ecf4cea7b8933 (diff) |
scsi: storvsc: fix SRB_STATUS_ABORTED handling
Commit 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB
status flags") filtered SRB_STATUS_AUTOSENSE_VALID out effectively making
the (SRB_STATUS_ABORTED | SRB_STATUS_AUTOSENSE_VALID) case a dead code. The
logic from this branch (e.g. storvsc_device_scan() call) is still required,
fix the check.
Cc: <stable@vger.kernel.org> #v4.4+
Fixes: 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB status flags")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/storvsc_drv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 292c04eec9ad..3ddcabb790a8 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c | |||
@@ -914,8 +914,9 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, | |||
914 | do_work = true; | 914 | do_work = true; |
915 | process_err_fn = storvsc_remove_lun; | 915 | process_err_fn = storvsc_remove_lun; |
916 | break; | 916 | break; |
917 | case (SRB_STATUS_ABORTED | SRB_STATUS_AUTOSENSE_VALID): | 917 | case SRB_STATUS_ABORTED: |
918 | if ((asc == 0x2a) && (ascq == 0x9)) { | 918 | if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID && |
919 | (asc == 0x2a) && (ascq == 0x9)) { | ||
919 | do_work = true; | 920 | do_work = true; |
920 | process_err_fn = storvsc_device_scan; | 921 | process_err_fn = storvsc_device_scan; |
921 | /* | 922 | /* |