diff mbox series

[32/42] acornscsi: translate message byte to host byte

Message ID 20210421174749.11221-33-hare@suse.de
State New
Headers show
Series SCSI result cleanup, part 2 | expand

Commit Message

Hannes Reinecke April 21, 2021, 5:47 p.m. UTC
Instead of setting the message byte translate it to the appropriate
host byte. As error recovery would return DID_ERROR for any non-zero
message byte the translation doesn't change the error handling.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/arm/acornscsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c
index 17590b1053a8..784d18077752 100644
--- a/drivers/scsi/arm/acornscsi.c
+++ b/drivers/scsi/arm/acornscsi.c
@@ -795,7 +795,8 @@  static void acornscsi_done(AS_Host *host, struct scsi_cmnd **SCpntp,
 	acornscsi_dma_cleanup(host);
 
 	set_host_byte(SCpnt, result);
-	set_msg_byte(SCpnt, host->scsi.SCp.Message);
+	if (result != DID_OK)
+		translate_msg_byte(SCpnt, host->scsi.SCp.Message);
 	set_status_byte(SCpnt, host->scsi.SCp.Status);
 
 	/*