aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r--drivers/scsi/libiscsi.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 4e2ca8f7d9a1..36f520b9260e 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1440,12 +1440,6 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn)
1440 1440
1441 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx); 1441 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1442 mutex_lock(&conn->xmitmutex); 1442 mutex_lock(&conn->xmitmutex);
1443 if (conn->c_stage == ISCSI_CONN_INITIAL_STAGE) {
1444 if (session->tt->suspend_conn_recv)
1445 session->tt->suspend_conn_recv(conn);
1446
1447 session->tt->terminate_conn(conn);
1448 }
1449 1443
1450 spin_lock_bh(&session->lock); 1444 spin_lock_bh(&session->lock);
1451 conn->c_stage = ISCSI_CONN_CLEANUP_WAIT; 1445 conn->c_stage = ISCSI_CONN_CLEANUP_WAIT;
@@ -1622,8 +1616,9 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
1622 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx); 1616 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
1623 spin_unlock_bh(&session->lock); 1617 spin_unlock_bh(&session->lock);
1624 1618
1625 if (session->tt->suspend_conn_recv) 1619 write_lock_bh(conn->recv_lock);
1626 session->tt->suspend_conn_recv(conn); 1620 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
1621 write_unlock_bh(conn->recv_lock);
1627 1622
1628 mutex_lock(&conn->xmitmutex); 1623 mutex_lock(&conn->xmitmutex);
1629 /* 1624 /*
@@ -1642,7 +1637,6 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
1642 } 1637 }
1643 } 1638 }
1644 1639
1645 session->tt->terminate_conn(conn);
1646 /* 1640 /*
1647 * flush queues. 1641 * flush queues.
1648 */ 1642 */