scsi: storvsc: fix SRB_STATUS_ABORTED handling
Subsystems (2)
PATCH 1/1 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.
--- drivers/scsi/storvsc_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/storvsc_drv.c +3 -2
@@ -914,8 +914,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;/*
Signature · 1 line
2.5.0
Quoted 21 lines
-----Original Message-----
From: Vitaly Kuznetsov [mailto:[email protected]]
Sent: Monday, March 7, 2016 3:00 AM
To: [email protected]
Cc: [email protected]; [email protected]; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Cathy Avery <[email protected]>; James E.J. Bottomley <[email protected]>; Martin K. Petersen" <[email protected]>
Subject: [PATCH] scsi: storvsc: fixSRB_STATUS_ABORTEDhandlingCommit
3209f9d780d1("scsi: storvsc: Fix a bug in the handling of SRB status flags") filteredSRB_STATUS_AUTOSENSE_VALIDout 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.
Quoted 3 lines
Fixes 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB statusflags")
Signed-off-by Vitaly Kuznetsov <[email protected]>
Thanks Vitaly.
Quoted 24 lines
--- drivers/scsi/storvsc_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/scsi/storvsc_drv.c +2
-2@@ -914,8 +914,9 @@ static void storvsc_handle_error(structvmscsi_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&&
drivers/scsi/storvsc_drv.c +1
-1+ (asc == 0x2a) && (ascq == 0x9)) { do_work = true; process_err_fn = storvsc_device_scan;/* -- 2.5.0
Martin K. Petersen
AppliedQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Vitaly" == Vitaly Kuznetsov <[email protected]> writes:
Vitaly> Commit 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling Vitaly> of SRB status flags") filtered SRB_STATUS_AUTOSENSE_VALID out Vitaly> effectively making the (SRB_STATUS_ABORTED |
Vitaly> SRB_STATUS_AUTOSENSE_VALID) case a dead code. The logic from Vitaly> this branch (e.g. storvsc_device_scan() call) is still required, Vitaly> fix the check.
Applied to 4.5/scsi-fixes.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering