From 6bec4c3842cd7338973839683bbf96273c3b85f7 Mon Sep 17 00:00:00 2001 From: Johannes Thumshirn Date: Mon, 25 Jun 2018 13:20:59 +0200 Subject: 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 Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- drivers/scsi/imm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi/imm.c') 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); -- cgit v1.2.3