aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-09-24 12:46:12 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-13 09:28:59 -0400
commit8e12452549ba2dfa17db97bc495172fac221a7ab (patch)
tree6f1617afb90ad9e5c50698d39bcb2c850feece6a /drivers/scsi
parent21536062d98938dfcfbae593a26c154e359749dc (diff)
[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: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/iscsi_tcp.c2
-rw-r--r--drivers/scsi/libiscsi.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 752f42884cc1..4f096de81525 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -1909,7 +1909,7 @@ static struct scsi_host_template iscsi_sht = {
1909 .cmd_per_lun = ISCSI_DEF_CMD_PER_LUN, 1909 .cmd_per_lun = ISCSI_DEF_CMD_PER_LUN,
1910 .eh_abort_handler = iscsi_eh_abort, 1910 .eh_abort_handler = iscsi_eh_abort,
1911 .eh_device_reset_handler= iscsi_eh_device_reset, 1911 .eh_device_reset_handler= iscsi_eh_device_reset,
1912 .eh_host_reset_handler = iscsi_eh_host_reset, 1912 .eh_target_reset_handler= iscsi_eh_target_reset,
1913 .use_clustering = DISABLE_CLUSTERING, 1913 .use_clustering = DISABLE_CLUSTERING,
1914 .slave_configure = iscsi_tcp_slave_configure, 1914 .slave_configure = iscsi_tcp_slave_configure,
1915 .proc_name = "iscsi_tcp", 1915 .proc_name = "iscsi_tcp",
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 390781894be9..e3e57cce4886 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1367,7 +1367,7 @@ void iscsi_session_recovery_timedout(struct iscsi_cls_session *cls_session)
1367} 1367}
1368EXPORT_SYMBOL_GPL(iscsi_session_recovery_timedout); 1368EXPORT_SYMBOL_GPL(iscsi_session_recovery_timedout);
1369 1369
1370int iscsi_eh_host_reset(struct scsi_cmnd *sc) 1370int iscsi_eh_target_reset(struct scsi_cmnd *sc)
1371{ 1371{
1372 struct iscsi_cls_session *cls_session; 1372 struct iscsi_cls_session *cls_session;
1373 struct iscsi_session *session; 1373 struct iscsi_session *session;
@@ -1381,7 +1381,7 @@ int iscsi_eh_host_reset(struct scsi_cmnd *sc)
1381 spin_lock_bh(&session->lock); 1381 spin_lock_bh(&session->lock);
1382 if (session->state == ISCSI_STATE_TERMINATE) { 1382 if (session->state == ISCSI_STATE_TERMINATE) {
1383failed: 1383failed:
1384 debug_scsi("failing host reset: session terminated " 1384 debug_scsi("failing target reset: session terminated "
1385 "[CID %d age %d]\n", conn->id, session->age); 1385 "[CID %d age %d]\n", conn->id, session->age);
1386 spin_unlock_bh(&session->lock); 1386 spin_unlock_bh(&session->lock);
1387 mutex_unlock(&session->eh_mutex); 1387 mutex_unlock(&session->eh_mutex);
@@ -1396,7 +1396,7 @@ failed:
1396 */ 1396 */
1397 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); 1397 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
1398 1398
1399 debug_scsi("iscsi_eh_host_reset wait for relogin\n"); 1399 debug_scsi("iscsi_eh_target_reset wait for relogin\n");
1400 wait_event_interruptible(conn->ehwait, 1400 wait_event_interruptible(conn->ehwait,
1401 session->state == ISCSI_STATE_TERMINATE || 1401 session->state == ISCSI_STATE_TERMINATE ||
1402 session->state == ISCSI_STATE_LOGGED_IN || 1402 session->state == ISCSI_STATE_LOGGED_IN ||
@@ -1408,14 +1408,14 @@ failed:
1408 spin_lock_bh(&session->lock); 1408 spin_lock_bh(&session->lock);
1409 if (session->state == ISCSI_STATE_LOGGED_IN) 1409 if (session->state == ISCSI_STATE_LOGGED_IN)
1410 iscsi_session_printk(KERN_INFO, session, 1410 iscsi_session_printk(KERN_INFO, session,
1411 "host reset succeeded\n"); 1411 "target reset succeeded\n");
1412 else 1412 else
1413 goto failed; 1413 goto failed;
1414 spin_unlock_bh(&session->lock); 1414 spin_unlock_bh(&session->lock);
1415 mutex_unlock(&session->eh_mutex); 1415 mutex_unlock(&session->eh_mutex);
1416 return SUCCESS; 1416 return SUCCESS;
1417} 1417}
1418EXPORT_SYMBOL_GPL(iscsi_eh_host_reset); 1418EXPORT_SYMBOL_GPL(iscsi_eh_target_reset);
1419 1419
1420static void iscsi_tmf_timedout(unsigned long data) 1420static void iscsi_tmf_timedout(unsigned long data)
1421{ 1421{