summaryrefslogtreecommitdiff
path: root/drivers/scsi/NCR5380.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2021-04-27 11:30:21 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-06-01 05:48:22 +0300
commit7b25bdb1c828719a4732600faeaf0ba3f34816e6 (patch)
tree52a41b867db49fb2d9a9c4fe4accf5b892d5a9ff /drivers/scsi/NCR5380.c
parent54c29086195fd72b6a290ef367e71f73fa657b1f (diff)
downloadlinux-7b25bdb1c828719a4732600faeaf0ba3f34816e6.tar.xz
scsi: NCR5380: Fold SCSI message ABORT onto DID_ABORT
The message byte can take only two values, COMMAND_COMPLETE and ABORT. So we can easily map ABORT to DID_ABORT and not set the message byte. Link: https://lore.kernel.org/r/20210427083046.31620-16-hare@suse.de Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/NCR5380.c')
-rw-r--r--drivers/scsi/NCR5380.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index d7594b794d3c..a74674941e7d 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -1815,6 +1815,8 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
switch (tmp) {
case ABORT:
+ set_host_byte(cmd, DID_ABORT);
+ /* fallthrough */
case COMMAND_COMPLETE:
/* Accept message by clearing ACK */
sink = 1;
@@ -1826,9 +1828,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
hostdata->connected = NULL;
hostdata->busy[scmd_id(cmd)] &= ~(1 << cmd->device->lun);
- cmd->result &= ~0xffff;
- cmd->result |= cmd->SCp.Status;
- cmd->result |= cmd->SCp.Message << 8;
+ set_status_byte(cmd, cmd->SCp.Status);
set_resid_from_SCp(cmd);