scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION
authorJohannes Thumshirn <jthumshirn@suse.de>
Mon, 9 Apr 2018 12:39:22 +0000 (14:39 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 10 Apr 2018 01:04:36 +0000 (21:04 -0400)
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>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_isr.c

index a47a582b039713072f93dafbd25651b0fc6ddd15..a3dc83f9444dade9e3a549756dddd23b0d4d852a 100644 (file)
@@ -2174,7 +2174,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;
        }
 
@@ -2184,7 +2184,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;
        }
 
@@ -2194,7 +2194,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;
        }