aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sym53c8xx_2/sym_glue.h
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2018-06-25 13:20:59 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-06-26 12:27:07 -0400
commit6bec4c3842cd7338973839683bbf96273c3b85f7 (patch)
treeba97de671cbfeb8c47d7eb3338a2b2be34cec94f /drivers/scsi/sym53c8xx_2/sym_glue.h
parentscsi: core: check for equality of result byte values (diff)
downloadlinux-dev-6bec4c3842cd7338973839683bbf96273c3b85f7.tar.xz
linux-dev-6bec4c3842cd7338973839683bbf96273c3b85f7.zip
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.h2
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);