Commit ff06c5ff authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Martin K. Petersen

scsi: storvsc: fix SRB_STATUS_ABORTED handling

Commit 3209f9d7 ("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: 3209f9d7 ("scsi: storvsc: Fix a bug in the handling of SRB status flags")
Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 84bd6499
...@@ -914,8 +914,9 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, ...@@ -914,8 +914,9 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,
do_work = true; do_work = true;
process_err_fn = storvsc_remove_lun; process_err_fn = storvsc_remove_lun;
break; break;
case (SRB_STATUS_ABORTED | SRB_STATUS_AUTOSENSE_VALID): case SRB_STATUS_ABORTED:
if ((asc == 0x2a) && (ascq == 0x9)) { if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID &&
(asc == 0x2a) && (ascq == 0x9)) {
do_work = true; do_work = true;
process_err_fn = storvsc_device_scan; process_err_fn = storvsc_device_scan;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment