[PATCH 22/42] qlogicfas408: translate message to host byte status

Hannes Reinecke
2021-04-21T17:48:52Z

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/qlogicfas408.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qlogicfas408.c b/drivers/scsi/qlogicfas408.c
index 86de400ca81a..aca76106f111 100644
--- a/drivers/scsi/qlogicfas408.c
+++ b/drivers/scsi/qlogicfas408.c
@@ -409,7 +409,8 @@ static void ql_pcmd(struct scsi_cmnd *cmd)
}

set_host_byte(cmd, result);
- set_msg_byte(cmd, message);
+ if (result == DID_OK && message != COMMAND_COMPLETE)
+ translate_msg_byte(cmd, message);
set_status_byte(cmd, status);
return;
}
--
2.29.2