[PATCH 12/52] gdth: use standard SAM status codes

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

 



Use standard SAM status codes and omit the explicit shift to convert
from linux-specific ones.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 drivers/scsi/gdth.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index fe03410268e6..d23e277c1b85 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -1677,7 +1677,7 @@ static void gdth_next(gdth_ha_str *ha)
                 memset((char*)nscp->sense_buffer,0,16);
                 nscp->sense_buffer[0] = 0x70;
                 nscp->sense_buffer[2] = NOT_READY;
-                nscp->result = (DID_OK << 16) | (CHECK_CONDITION << 1);
+		nscp->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION;
                 if (!nscp_cmndinfo->wait_for_completion)
                     nscp_cmndinfo->wait_for_completion++;
                 else
@@ -1722,7 +1722,7 @@ static void gdth_next(gdth_ha_str *ha)
                     memset((char*)nscp->sense_buffer,0,16);
                     nscp->sense_buffer[0] = 0x70;
                     nscp->sense_buffer[2] = UNIT_ATTENTION;
-                    nscp->result = (DID_OK << 16) | (CHECK_CONDITION << 1);
+		    nscp->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION;
                     if (!nscp_cmndinfo->wait_for_completion)
                         nscp_cmndinfo->wait_for_completion++;
                     else
@@ -1774,7 +1774,7 @@ static void gdth_next(gdth_ha_str *ha)
                     memset((char*)nscp->sense_buffer,0,16);
                     nscp->sense_buffer[0] = 0x70;
                     nscp->sense_buffer[2] = UNIT_ATTENTION;
-                    nscp->result = (DID_OK << 16) | (CHECK_CONDITION << 1);
+		    nscp->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION;
                     if (!nscp_cmndinfo->wait_for_completion)
                         nscp_cmndinfo->wait_for_completion++;
                     else
@@ -2802,7 +2802,7 @@ static int gdth_sync_event(gdth_ha_str *ha, int service, u8 index,
                 memset((char*)scp->sense_buffer,0,16);
                 scp->sense_buffer[0] = 0x70;
                 scp->sense_buffer[2] = NOT_READY;
-                scp->result = (DID_OK << 16) | (CHECK_CONDITION << 1);
+		scp->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION;
             } else if (service == CACHESERVICE) {
                 if (ha->status == S_CACHE_UNKNOWN &&
                     (ha->hdr[t].cluster_type & 
@@ -2812,11 +2812,11 @@ static int gdth_sync_event(gdth_ha_str *ha, int service, u8 index,
                 }
                 memset((char*)scp->sense_buffer,0,16);
                 if (ha->status == (u16)S_CACHE_RESERV) {
-                    scp->result = (DID_OK << 16) | (RESERVATION_CONFLICT << 1);
+                    scp->result = (DID_OK << 16) | SAM_STAT_RESERVATION_CONFLICT;
                 } else {
                     scp->sense_buffer[0] = 0x70;
                     scp->sense_buffer[2] = NOT_READY;
-                    scp->result = (DID_OK << 16) | (CHECK_CONDITION << 1);
+                    scp->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION;
                 }
                 if (!cmndinfo->internal_command) {
                     ha->dvr.size = sizeof(ha->dvr.eu.sync);
-- 
2.16.4




[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