summaryrefslogtreecommitdiff
path: root/drivers/scsi/dc395x.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2021-04-27 10:30:25 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-05-31 22:48:22 -0400
commit5bfaafb652d1659001a68324d47a3a4b149dfd33 (patch)
tree61dd529902f01196cb7465b3e80e8a3af2b64be4 /drivers/scsi/dc395x.c
parent75dd44395af2b4d4f14d22027411326a07954281 (diff)
scsi: dc395: Translate message bytes
Drop message byte setting if the host byte is already set, and translate message bytes into the related host bytes when evaluating an overrun or underrun. Link: https://lore.kernel.org/r/20210427083046.31620-20-hare@suse.de Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/dc395x.c')
-rw-r--r--drivers/scsi/dc395x.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index 598448ece8d0..24c7cefb0b78 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -3226,7 +3226,6 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
}
dprintkdbg(DBG_0, "srb_done: AUTO_REQSENSE2\n");
- set_msg_byte(cmd, srb->end_message);
set_status_byte(cmd, SAM_STAT_CHECK_CONDITION);
goto ckc_e;
@@ -3260,7 +3259,6 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
} else {
srb->adapter_status = 0;
set_host_byte(cmd, DID_ERROR);
- set_msg_byte(cmd, srb->end_message);
set_status_byte(cmd, status);
}
} else {
@@ -3270,10 +3268,9 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
status = srb->adapter_status;
if (status & H_OVER_UNDER_RUN) {
srb->target_status = 0;
- set_msg_byte(cmd, srb->end_message);
+ scsi_msg_to_host_byte(cmd, srb->end_message);
} else if (srb->status & PARITY_ERROR) {
set_host_byte(cmd, DID_PARITY);
- set_msg_byte(cmd, srb->end_message);
} else { /* No error */
srb->adapter_status = 0;