diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2018-06-25 13:20:59 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-06-26 18:27:07 +0200 |
commit | 6bec4c3842cd7338973839683bbf96273c3b85f7 (patch) | |
tree | ba97de671cbfeb8c47d7eb3338a2b2be34cec94f /drivers/scsi/sym53c8xx_2/sym_glue.c | |
parent | scsi: core: check for equality of result byte values (diff) | |
download | linux-6bec4c3842cd7338973839683bbf96273c3b85f7.tar.xz linux-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.c')
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_glue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 7320d5fe4cbc..5f10aa9bad9b 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -252,7 +252,7 @@ void sym_set_cam_result_error(struct sym_hcb *np, struct sym_ccb *cp, int resid) cam_status = sym_xerr_cam_status(DID_ERROR, cp->xerr_status); } scsi_set_resid(cmd, resid); - cmd->result = (drv_status << 24) + (cam_status << 16) + scsi_status; + cmd->result = (drv_status << 24) | (cam_status << 16) | scsi_status; } static int sym_scatter(struct sym_hcb *np, struct sym_ccb *cp, struct scsi_cmnd *cmd) |