[PATCH 27/42] wd33c93: translate message byte to host byte

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 drivers/scsi/wd33c93.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
index 0a5bb238f001..e886e17fbf45 100644
--- a/drivers/scsi/wd33c93.c
+++ b/drivers/scsi/wd33c93.c
@@ -1168,7 +1168,6 @@ wd33c93_intr(struct Scsi_Host *instance)
 		write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER);
 		if (phs == 0x60) {
 			DB(DB_INTR, printk("SX-DONE"))
-			    cmd->SCp.Message = COMMAND_COMPLETE;
 			lun = read_wd33c93(regs, WD_TARGET_LUN);
 			DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun))
 			    hostdata->connected = NULL;
@@ -1180,8 +1179,8 @@ wd33c93_intr(struct Scsi_Host *instance)
 			    && cmd->SCp.Status != SAM_STAT_GOOD)
 				set_host_byte(cmd, DID_ERROR);
 			else {
+				set_host_byte(cmd, DID_OK);
 				set_status_byte(cmd, cmd->SCp.Status);
-				set_msg_byte(cmd, cmd->SCp.Message);
 			}
 			cmd->scsi_done(cmd);
 
@@ -1266,8 +1265,9 @@ wd33c93_intr(struct Scsi_Host *instance)
 		    cmd->SCp.Status != SAM_STAT_GOOD)
 			set_host_byte(cmd, DID_ERROR);
 		else {
+			set_host_byte(cmd, DID_OK);
+			translate_msg_byte(cmd, cmd->SCp.Message);
 			set_status_byte(cmd, cmd->SCp.Status);
-			set_msg_byte(cmd, cmd->SCp.Message);
 		}
 		cmd->scsi_done(cmd);
 
@@ -1301,8 +1301,9 @@ wd33c93_intr(struct Scsi_Host *instance)
 				&& cmd->SCp.Status != SAM_STAT_GOOD)
 				    set_host_byte(cmd, DID_ERROR);
 			    else {
+				    set_host_byte(cmd, DID_OK);
+				    translate_msg_byte(cmd, cmd->SCp.Message);
 				    set_status_byte(cmd, cmd->SCp.Status);
-				    set_msg_byte(cmd, cmd->SCp.Message);
 			    }
 			cmd->scsi_done(cmd);
 			break;
-- 
2.29.2




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux