All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION
@ 2018-04-09 12:39 Johannes Thumshirn
  2018-04-09 13:56 ` Hannes Reinecke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2018-04-09 12:39 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Linux Kernel Mailinglist, Linux SCSI Mailinglist,
	Bart Van Assche, Hannes Reinecke, Johannes Thumshirn,
	Himanshu Madhani

Bart reports that in qla_isr.c's qla2x00_handle_dif_error we're
wrongly shifting the SAM_STAT_CHECK_CONDITION by one instead of
directly ORing it onto the SCSI command's result.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reported-by: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
---
 drivers/scsi/qla2xxx/qla_isr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 49d67e1d571f..ed6cdfea00b4 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -2195,7 +2195,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
 		    0x10, 0x1);
 		set_driver_byte(cmd, DRIVER_SENSE);
 		set_host_byte(cmd, DID_ABORT);
-		cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
+		cmd->result |= SAM_STAT_CHECK_CONDITION;
 		return 1;
 	}
 
@@ -2205,7 +2205,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
 		    0x10, 0x3);
 		set_driver_byte(cmd, DRIVER_SENSE);
 		set_host_byte(cmd, DID_ABORT);
-		cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
+		cmd->result |= SAM_STAT_CHECK_CONDITION;
 		return 1;
 	}
 
@@ -2215,7 +2215,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
 		    0x10, 0x2);
 		set_driver_byte(cmd, DRIVER_SENSE);
 		set_host_byte(cmd, DID_ABORT);
-		cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
+		cmd->result |= SAM_STAT_CHECK_CONDITION;
 		return 1;
 	}
 
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION
  2018-04-09 12:39 [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION Johannes Thumshirn
@ 2018-04-09 13:56 ` Hannes Reinecke
  2018-04-09 14:14 ` Bart Van Assche
  2018-04-10  1:18 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2018-04-09 13:56 UTC (permalink / raw)
  To: Johannes Thumshirn, Martin K . Petersen
  Cc: Linux Kernel Mailinglist, Linux SCSI Mailinglist,
	Bart Van Assche, Himanshu Madhani

On 04/09/2018 02:39 PM, Johannes Thumshirn wrote:
> Bart reports that in qla_isr.c's qla2x00_handle_dif_error we're
> wrongly shifting the SAM_STAT_CHECK_CONDITION by one instead of
> directly ORing it onto the SCSI command's result.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> Reported-by: Bart Van Assche <Bart.VanAssche@wdc.com>
> Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
> ---
>  drivers/scsi/qla2xxx/qla_isr.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
> index 49d67e1d571f..ed6cdfea00b4 100644
> --- a/drivers/scsi/qla2xxx/qla_isr.c
> +++ b/drivers/scsi/qla2xxx/qla_isr.c
> @@ -2195,7 +2195,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
>  		    0x10, 0x1);
>  		set_driver_byte(cmd, DRIVER_SENSE);
>  		set_host_byte(cmd, DID_ABORT);
> -		cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
> +		cmd->result |= SAM_STAT_CHECK_CONDITION;
>  		return 1;
>  	}
>  
> @@ -2205,7 +2205,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
>  		    0x10, 0x3);
>  		set_driver_byte(cmd, DRIVER_SENSE);
>  		set_host_byte(cmd, DID_ABORT);
> -		cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
> +		cmd->result |= SAM_STAT_CHECK_CONDITION;
>  		return 1;
>  	}
>  
> @@ -2215,7 +2215,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
>  		    0x10, 0x2);
>  		set_driver_byte(cmd, DRIVER_SENSE);
>  		set_host_byte(cmd, DID_ABORT);
> -		cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
> +		cmd->result |= SAM_STAT_CHECK_CONDITION;
>  		return 1;
>  	}
>  
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION
  2018-04-09 12:39 [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION Johannes Thumshirn
  2018-04-09 13:56 ` Hannes Reinecke
@ 2018-04-09 14:14 ` Bart Van Assche
  2018-04-10  1:18 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2018-04-09 14:14 UTC (permalink / raw)
  To: jthumshirn, martin.petersen
  Cc: linux-scsi, linux-kernel, Bart Van Assche, hare, himanshu.madhani

On Mon, 2018-04-09 at 14:39 +0200, Johannes Thumshirn wrote:
> Bart reports that in qla_isr.c's qla2x00_handle_dif_error we're
> wrongly shifting the SAM_STAT_CHECK_CONDITION by one instead of
> directly ORing it onto the SCSI command's result.

Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION
  2018-04-09 12:39 [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION Johannes Thumshirn
  2018-04-09 13:56 ` Hannes Reinecke
  2018-04-09 14:14 ` Bart Van Assche
@ 2018-04-10  1:18 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2018-04-10  1:18 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: Martin K . Petersen, Linux Kernel Mailinglist,
	Linux SCSI Mailinglist, Bart Van Assche, Hannes Reinecke,
	Himanshu Madhani


Johannes,

> Bart reports that in qla_isr.c's qla2x00_handle_dif_error we're
> wrongly shifting the SAM_STAT_CHECK_CONDITION by one instead of
> directly ORing it onto the SCSI command's result.

Applied to 4.17/scsi-fixes. Thx!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-10  1:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-09 12:39 [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION Johannes Thumshirn
2018-04-09 13:56 ` Hannes Reinecke
2018-04-09 14:14 ` Bart Van Assche
2018-04-10  1:18 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.