* [PATCH] scsi: storvsc: fix SRB_STATUS_ABORTED handling
@ 2016-03-07 10:59 Vitaly Kuznetsov
2016-03-08 1:16 ` KY Srinivasan
2016-03-09 1:59 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Vitaly Kuznetsov @ 2016-03-07 10:59 UTC (permalink / raw)
To: linux-scsi
Cc: linux-kernel, devel, K. Y. Srinivasan, Haiyang Zhang, Cathy Avery,
James E.J. Bottomley, Martin K. Petersen"
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>
---
drivers/scsi/storvsc_drv.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 292c04e..3ddcabb 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,
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;
/*
--
2.5.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [PATCH] scsi: storvsc: fix SRB_STATUS_ABORTED handling
2016-03-07 10:59 [PATCH] scsi: storvsc: fix SRB_STATUS_ABORTED handling Vitaly Kuznetsov
@ 2016-03-08 1:16 ` KY Srinivasan
2016-03-09 1:59 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: KY Srinivasan @ 2016-03-08 1:16 UTC (permalink / raw)
To: Vitaly Kuznetsov, linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
Haiyang Zhang, Cathy Avery, James E.J. Bottomley,
Martin K. Petersen"
> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
> Sent: Monday, March 7, 2016 3:00 AM
> To: linux-scsi@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; KY
> Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Cathy Avery <cavery@redhat.com>; James E.J.
> Bottomley <JBottomley@odin.com>; Martin K. Petersen"
> <martin.petersen@oracle.com>
> Subject: [PATCH] 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.
>
> Fixes: 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB status
> flags")
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Thanks Vitaly.
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
> ---
> drivers/scsi/storvsc_drv.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 292c04e..3ddcabb 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,
> 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;
> /*
> --
> 2.5.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] scsi: storvsc: fix SRB_STATUS_ABORTED handling
2016-03-07 10:59 [PATCH] scsi: storvsc: fix SRB_STATUS_ABORTED handling Vitaly Kuznetsov
2016-03-08 1:16 ` KY Srinivasan
@ 2016-03-09 1:59 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-03-09 1:59 UTC (permalink / raw)
To: Vitaly Kuznetsov
Cc: linux-scsi, linux-kernel, devel, K. Y. Srinivasan, Haiyang Zhang,
Cathy Avery
>>>>> "Vitaly" == Vitaly Kuznetsov <vkuznets@redhat.com> 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.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-09 1:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 10:59 [PATCH] scsi: storvsc: fix SRB_STATUS_ABORTED handling Vitaly Kuznetsov
2016-03-08 1:16 ` KY Srinivasan
2016-03-09 1:59 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox