Commit 8e124525 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[SCSI] libiscsi: rename host reset to target reset

I had this in my patchset to add target reset support, but
it got dropped due to patching conflicts. This initial patch
just renames the function and users. We are actually just
dropping the session, and so this does not have anything to do
with the host exactly. It does for software iscsi because
we allocate a host per session, but for cxgb3i this makes no
sense.
Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 21536062
...@@ -598,7 +598,7 @@ static struct scsi_host_template iscsi_iser_sht = { ...@@ -598,7 +598,7 @@ static struct scsi_host_template iscsi_iser_sht = {
.cmd_per_lun = ISCSI_MAX_CMD_PER_LUN, .cmd_per_lun = ISCSI_MAX_CMD_PER_LUN,
.eh_abort_handler = iscsi_eh_abort, .eh_abort_handler = iscsi_eh_abort,
.eh_device_reset_handler= iscsi_eh_device_reset, .eh_device_reset_handler= iscsi_eh_device_reset,
.eh_host_reset_handler = iscsi_eh_host_reset, .eh_target_reset_handler= iscsi_eh_target_reset,
.use_clustering = DISABLE_CLUSTERING, .use_clustering = DISABLE_CLUSTERING,
.proc_name = "iscsi_iser", .proc_name = "iscsi_iser",
.this_id = -1, .this_id = -1,
......
...@@ -1909,7 +1909,7 @@ static struct scsi_host_template iscsi_sht = { ...@@ -1909,7 +1909,7 @@ static struct scsi_host_template iscsi_sht = {
.cmd_per_lun = ISCSI_DEF_CMD_PER_LUN, .cmd_per_lun = ISCSI_DEF_CMD_PER_LUN,
.eh_abort_handler = iscsi_eh_abort, .eh_abort_handler = iscsi_eh_abort,
.eh_device_reset_handler= iscsi_eh_device_reset, .eh_device_reset_handler= iscsi_eh_device_reset,
.eh_host_reset_handler = iscsi_eh_host_reset, .eh_target_reset_handler= iscsi_eh_target_reset,
.use_clustering = DISABLE_CLUSTERING, .use_clustering = DISABLE_CLUSTERING,
.slave_configure = iscsi_tcp_slave_configure, .slave_configure = iscsi_tcp_slave_configure,
.proc_name = "iscsi_tcp", .proc_name = "iscsi_tcp",
......
...@@ -1367,7 +1367,7 @@ void iscsi_session_recovery_timedout(struct iscsi_cls_session *cls_session) ...@@ -1367,7 +1367,7 @@ void iscsi_session_recovery_timedout(struct iscsi_cls_session *cls_session)
} }
EXPORT_SYMBOL_GPL(iscsi_session_recovery_timedout); EXPORT_SYMBOL_GPL(iscsi_session_recovery_timedout);
int iscsi_eh_host_reset(struct scsi_cmnd *sc) int iscsi_eh_target_reset(struct scsi_cmnd *sc)
{ {
struct iscsi_cls_session *cls_session; struct iscsi_cls_session *cls_session;
struct iscsi_session *session; struct iscsi_session *session;
...@@ -1381,7 +1381,7 @@ int iscsi_eh_host_reset(struct scsi_cmnd *sc) ...@@ -1381,7 +1381,7 @@ int iscsi_eh_host_reset(struct scsi_cmnd *sc)
spin_lock_bh(&session->lock); spin_lock_bh(&session->lock);
if (session->state == ISCSI_STATE_TERMINATE) { if (session->state == ISCSI_STATE_TERMINATE) {
failed: failed:
debug_scsi("failing host reset: session terminated " debug_scsi("failing target reset: session terminated "
"[CID %d age %d]\n", conn->id, session->age); "[CID %d age %d]\n", conn->id, session->age);
spin_unlock_bh(&session->lock); spin_unlock_bh(&session->lock);
mutex_unlock(&session->eh_mutex); mutex_unlock(&session->eh_mutex);
...@@ -1396,7 +1396,7 @@ failed: ...@@ -1396,7 +1396,7 @@ failed:
*/ */
iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
debug_scsi("iscsi_eh_host_reset wait for relogin\n"); debug_scsi("iscsi_eh_target_reset wait for relogin\n");
wait_event_interruptible(conn->ehwait, wait_event_interruptible(conn->ehwait,
session->state == ISCSI_STATE_TERMINATE || session->state == ISCSI_STATE_TERMINATE ||
session->state == ISCSI_STATE_LOGGED_IN || session->state == ISCSI_STATE_LOGGED_IN ||
...@@ -1408,14 +1408,14 @@ failed: ...@@ -1408,14 +1408,14 @@ failed:
spin_lock_bh(&session->lock); spin_lock_bh(&session->lock);
if (session->state == ISCSI_STATE_LOGGED_IN) if (session->state == ISCSI_STATE_LOGGED_IN)
iscsi_session_printk(KERN_INFO, session, iscsi_session_printk(KERN_INFO, session,
"host reset succeeded\n"); "target reset succeeded\n");
else else
goto failed; goto failed;
spin_unlock_bh(&session->lock); spin_unlock_bh(&session->lock);
mutex_unlock(&session->eh_mutex); mutex_unlock(&session->eh_mutex);
return SUCCESS; return SUCCESS;
} }
EXPORT_SYMBOL_GPL(iscsi_eh_host_reset); EXPORT_SYMBOL_GPL(iscsi_eh_target_reset);
static void iscsi_tmf_timedout(unsigned long data) static void iscsi_tmf_timedout(unsigned long data)
{ {
......
...@@ -313,7 +313,7 @@ struct iscsi_host { ...@@ -313,7 +313,7 @@ struct iscsi_host {
*/ */
extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth); extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth);
extern int iscsi_eh_abort(struct scsi_cmnd *sc); extern int iscsi_eh_abort(struct scsi_cmnd *sc);
extern int iscsi_eh_host_reset(struct scsi_cmnd *sc); extern int iscsi_eh_target_reset(struct scsi_cmnd *sc);
extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); extern int iscsi_eh_device_reset(struct scsi_cmnd *sc);
extern int iscsi_queuecommand(struct scsi_cmnd *sc, extern int iscsi_queuecommand(struct scsi_cmnd *sc,
void (*done)(struct scsi_cmnd *)); void (*done)(struct scsi_cmnd *));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment