diff mbox series

[35/39] fdomain: translate message to host byte status

Message ID 20210423113944.42672-36-hare@suse.de
State Superseded
Headers show
Series SCSI result cleanup, part 2 | expand

Commit Message

Hannes Reinecke April 23, 2021, 11:39 a.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/fdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Finn Thain April 24, 2021, 9:21 a.m. UTC | #1
On Fri, 23 Apr 2021, Hannes Reinecke wrote:

> 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/fdomain.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c

> index 294dbfa5c761..2b946cb02693 100644

> --- a/drivers/scsi/fdomain.c

> +++ b/drivers/scsi/fdomain.c

> @@ -361,8 +361,8 @@ static void fdomain_work(struct work_struct *work)

>  

>  	if (done) {

>  		set_status_byte(cmd, cmd->SCp.Status);

> -		set_msg_byte(cmd, cmd->SCp.Message);

>  		set_host_byte(cmd, DID_OK);

> +		translate_msg_byte(cmd, cmd->SCp. Message);


There's an extra space character here.
diff mbox series

Patch

diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c
index 294dbfa5c761..2b946cb02693 100644
--- a/drivers/scsi/fdomain.c
+++ b/drivers/scsi/fdomain.c
@@ -361,8 +361,8 @@  static void fdomain_work(struct work_struct *work)
 
 	if (done) {
 		set_status_byte(cmd, cmd->SCp.Status);
-		set_msg_byte(cmd, cmd->SCp.Message);
 		set_host_byte(cmd, DID_OK);
+		translate_msg_byte(cmd, cmd->SCp. Message);
 		fdomain_finish_cmd(fd);
 	} else {
 		if (cmd->SCp.phase & disconnect) {