]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
scsi: storvsc: fix SRB_STATUS_ABORTED handling
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 7 Mar 2016 10:59:44 +0000 (11:59 +0100)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 20 Apr 2016 20:53:59 +0000 (14:53 -0600)
BugLink: http://bugs.launchpad.net/bugs/1572722
commit ff06c5ffbcb4ffa542fb80c897be977956fafecc upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/scsi/storvsc_drv.c

index 9972957ccaa85265225940ecefa1b775fd4a6446..33c5d66e76680d2b76db35ac38c3f42dea986990 100644 (file)
@@ -889,8 +889,9 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,
                do_work = true;
                process_err_fn = storvsc_remove_lun;
                break;
-       case (SRB_STATUS_ABORTED | SRB_STATUS_AUTOSENSE_VALID):
-               if ((asc == 0x2a) && (ascq == 0x9)) {
+       case SRB_STATUS_ABORTED:
+               if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID &&
+                   (asc == 0x2a) && (ascq == 0x9)) {
                        do_work = true;
                        process_err_fn = storvsc_device_scan;
                        /*