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/imm.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/imm.c')
-rw-r--r-- | drivers/scsi/imm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index 87c94191033b..8c6627bc8a39 100644 --- a/drivers/scsi/imm.c +++ b/drivers/scsi/imm.c @@ -892,7 +892,7 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd) /* Check for optional message byte */ if (imm_wait(dev) == (unsigned char) 0xb8) imm_in(dev, &h, 1); - cmd->result = (DID_OK << 16) + (l & STATUS_MASK); + cmd->result = (DID_OK << 16) | (l & STATUS_MASK); } if ((dev->mode == IMM_NIBBLE) || (dev->mode == IMM_PS2)) { w_ctr(ppb, 0x4); |