Skip to content

Commit ff06c5f

Browse files
vittyvkmartinkpetersen
authored andcommitted
scsi: storvsc: fix SRB_STATUS_ABORTED handling
Commit 3209f9d ("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: 3209f9d ("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>
1 parent 84bd649 commit ff06c5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/scsi/storvsc_drv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,8 +914,9 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,
914914
do_work = true;
915915
process_err_fn = storvsc_remove_lun;
916916
break;
917-
case (SRB_STATUS_ABORTED | SRB_STATUS_AUTOSENSE_VALID):
918-
if ((asc == 0x2a) && (ascq == 0x9)) {
917+
case SRB_STATUS_ABORTED:
918+
if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID &&
919+
(asc == 0x2a) && (ascq == 0x9)) {
919920
do_work = true;
920921
process_err_fn = storvsc_device_scan;
921922
/*

0 commit comments

Comments
 (0)