diff options
author | Johannes Thumshirn | 2018-06-25 13:20:59 +0200 |
---|---|---|
committer | Martin K. Petersen | 2018-06-26 12:27:07 -0400 |
commit | 6bec4c3842cd7338973839683bbf96273c3b85f7 (patch) | |
tree | ba97de671cbfeb8c47d7eb3338a2b2be34cec94f /drivers/scsi/sym53c8xx_2/sym_glue.h | |
parent | c65be1a63f1df224c8f22d72b9ec824241ada585 (diff) |
scsi: don't add scsi command result bytes
Some drivers are ADDing the scsi command's result bytes instead of ORing
them.
While this can produce correct results it has unexpected side effects.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sym53c8xx_2/sym_glue.h')
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_glue.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h index 805369521df8..e34801ae5d69 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.h +++ b/drivers/scsi/sym53c8xx_2/sym_glue.h @@ -256,7 +256,7 @@ sym_get_cam_status(struct scsi_cmnd *cmd) static inline void sym_set_cam_result_ok(struct sym_ccb *cp, struct scsi_cmnd *cmd, int resid) { scsi_set_resid(cmd, resid); - cmd->result = (((DID_OK) << 16) + ((cp->ssss_status) & 0x7f)); + cmd->result = (DID_OK << 16) | (cp->ssss_status & 0x7f); } void sym_set_cam_result_error(struct sym_hcb *np, struct sym_ccb *cp, int resid); |