[SCSI] iscsi class, libiscsi and qla4xxx: convert to new transport host byte values
authorMike Christie <michaelc@cs.wisc.edu>
Tue, 19 Aug 2008 23:45:26 +0000 (18:45 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 13 Oct 2008 13:28:49 +0000 (09:28 -0400)
This patch converts the iscsi drivers to the new host byte values.

v2
Drop some conversions. Want to avoid conflicts with other patches.
v1
initial patch.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/libiscsi.c
drivers/scsi/qla4xxx/ql4_isr.c
drivers/scsi/scsi_transport_iscsi.c

index 521dbf7e521d4bbf29c0d781423c9ba2f5678734..0e8f26baca6e6ccc66f93b17e45aee8a570ce831 100644 (file)
@@ -1200,7 +1200,7 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
                        goto reject;
                case ISCSI_STATE_RECOVERY_FAILED:
                        reason = FAILURE_SESSION_RECOVERY_TIMEOUT;
-                       sc->result = DID_NO_CONNECT << 16;
+                       sc->result = DID_TRANSPORT_FAILFAST << 16;
                        break;
                case ISCSI_STATE_TERMINATE:
                        reason = FAILURE_SESSION_TERMINATE;
@@ -2333,8 +2333,10 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
         * flush queues.
         */
        spin_lock_bh(&session->lock);
-       fail_all_commands(conn, -1,
-                       STOP_CONN_RECOVER ? DID_BUS_BUSY : DID_ERROR);
+       if (STOP_CONN_RECOVER)
+               fail_all_commands(conn, -1, DID_TRANSPORT_DISRUPTED);
+       else
+               fail_all_commands(conn, -1, DID_ERROR);
        flush_control_queues(session, conn);
        spin_unlock_bh(&session->lock);
        mutex_unlock(&session->eh_mutex);
index a91a57c57bffbd979d7fbc2c4b0c9b7880ef5ac4..799120fcb9be20a43901482781afd7dfbbd29884 100644 (file)
@@ -139,7 +139,7 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha,
                              ha->host_no, cmd->device->channel,
                              cmd->device->id, cmd->device->lun));
 
-               cmd->result = DID_BUS_BUSY << 16;
+               cmd->result = DID_TRANSPORT_DISRUPTED << 16;
 
                /*
                 * Mark device missing so that we won't continue to send
@@ -243,7 +243,7 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha,
                if (atomic_read(&ddb_entry->state) == DDB_STATE_ONLINE)
                        qla4xxx_mark_device_missing(ha, ddb_entry);
 
-               cmd->result = DID_BUS_BUSY << 16;
+               cmd->result = DID_TRANSPORT_DISRUPTED << 16;
                break;
 
        case SCS_QUEUE_FULL:
index 0ce5f7cdfe2a182a1e4216377e58476b6e2f1809..cbaae48f47ed9e1fb800dd71b019f637c1201f3e 100644 (file)
@@ -374,10 +374,10 @@ int iscsi_session_chkready(struct iscsi_cls_session *session)
                err = 0;
                break;
        case ISCSI_SESSION_FAILED:
-               err = DID_IMM_RETRY << 16;
+               err = DID_TRANSPORT_DISRUPTED << 16;
                break;
        case ISCSI_SESSION_FREE:
-               err = DID_NO_CONNECT << 16;
+               err = DID_TRANSPORT_FAILFAST << 16;
                break;
        default:
                err = DID_NO_CONNECT << 16;