[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY2PR0301MB16542B711D3EDF1F6755C7FCA0B20@BY2PR0301MB1654.namprd03.prod.outlook.com>
Date: Tue, 8 Mar 2016 01:16:03 +0000
From: KY Srinivasan <kys@...rosoft.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Cathy Avery <cavery@...hat.com>,
"James E.J. Bottomley" <JBottomley@...n.com>,
"Martin K. Petersen\"" <martin.petersen@...cle.com>
Subject: RE: [PATCH] scsi: storvsc: fix SRB_STATUS_ABORTED handling
> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@...hat.com]
> Sent: Monday, March 7, 2016 3:00 AM
> To: linux-scsi@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org; devel@...uxdriverproject.org; KY
> Srinivasan <kys@...rosoft.com>; Haiyang Zhang
> <haiyangz@...rosoft.com>; Cathy Avery <cavery@...hat.com>; James E.J.
> Bottomley <JBottomley@...n.com>; Martin K. Petersen"
> <martin.petersen@...cle.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@...hat.com>
Thanks Vitaly.
Acked-by: K. Y. Srinivasan <kys@...rosoft.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
Powered by blists - more mailing lists