[SCSI] iscsi class, libiscsi and qla4xxx: convert to new transport host byte values

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>
This commit is contained in:
Mike Christie 2008-08-19 18:45:26 -05:00 committed by James Bottomley
parent a4dfaa6f2e
commit 56d7fcfa81
3 changed files with 9 additions and 7 deletions

View File

@ -1200,7 +1200,7 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
goto reject; goto reject;
case ISCSI_STATE_RECOVERY_FAILED: case ISCSI_STATE_RECOVERY_FAILED:
reason = FAILURE_SESSION_RECOVERY_TIMEOUT; reason = FAILURE_SESSION_RECOVERY_TIMEOUT;
sc->result = DID_NO_CONNECT << 16; sc->result = DID_TRANSPORT_FAILFAST << 16;
break; break;
case ISCSI_STATE_TERMINATE: case ISCSI_STATE_TERMINATE:
reason = FAILURE_SESSION_TERMINATE; reason = FAILURE_SESSION_TERMINATE;
@ -2333,8 +2333,10 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
* flush queues. * flush queues.
*/ */
spin_lock_bh(&session->lock); spin_lock_bh(&session->lock);
fail_all_commands(conn, -1, if (STOP_CONN_RECOVER)
STOP_CONN_RECOVER ? DID_BUS_BUSY : DID_ERROR); fail_all_commands(conn, -1, DID_TRANSPORT_DISRUPTED);
else
fail_all_commands(conn, -1, DID_ERROR);
flush_control_queues(session, conn); flush_control_queues(session, conn);
spin_unlock_bh(&session->lock); spin_unlock_bh(&session->lock);
mutex_unlock(&session->eh_mutex); mutex_unlock(&session->eh_mutex);

View File

@ -139,7 +139,7 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha,
ha->host_no, cmd->device->channel, ha->host_no, cmd->device->channel,
cmd->device->id, cmd->device->lun)); 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 * 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) if (atomic_read(&ddb_entry->state) == DDB_STATE_ONLINE)
qla4xxx_mark_device_missing(ha, ddb_entry); qla4xxx_mark_device_missing(ha, ddb_entry);
cmd->result = DID_BUS_BUSY << 16; cmd->result = DID_TRANSPORT_DISRUPTED << 16;
break; break;
case SCS_QUEUE_FULL: case SCS_QUEUE_FULL:

View File

@ -374,10 +374,10 @@ int iscsi_session_chkready(struct iscsi_cls_session *session)
err = 0; err = 0;
break; break;
case ISCSI_SESSION_FAILED: case ISCSI_SESSION_FAILED:
err = DID_IMM_RETRY << 16; err = DID_TRANSPORT_DISRUPTED << 16;
break; break;
case ISCSI_SESSION_FREE: case ISCSI_SESSION_FREE:
err = DID_NO_CONNECT << 16; err = DID_TRANSPORT_FAILFAST << 16;
break; break;
default: default:
err = DID_NO_CONNECT << 16; err = DID_NO_CONNECT << 16;