aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_iscsi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2012-05-18 00:56:57 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-07-20 03:58:22 -0400
commit5d9fb5cc1b88277bb28a2a54e51b34cacaa123c2 (patch)
tree9067ba87ee1455850d97984608daa717f381e0d8 /drivers/scsi/scsi_transport_iscsi.c
parent1b8d26206134458044b0689f48194af00c96d406 (diff)
[SCSI] core, classes, mpt2sas: have scsi_internal_device_unblock take new state
This has scsi_internal_device_unblock/scsi_target_unblock take the new state to set the devices as an argument instead of always setting to running. The patch also converts users of these functions. This allows the FC and iSCSI class to transition devices from blocked to transport-offline, so that when fast_io_fail/replacement_timeout has fired we do not set the devices back to running. Instead, we set them to SDEV_TRANSPORT_OFFLINE. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 1cf640e575da..96ec21a959e9 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -907,7 +907,7 @@ static void session_recovery_timedout(struct work_struct *work)
907 session->transport->session_recovery_timedout(session); 907 session->transport->session_recovery_timedout(session);
908 908
909 ISCSI_DBG_TRANS_SESSION(session, "Unblocking SCSI target\n"); 909 ISCSI_DBG_TRANS_SESSION(session, "Unblocking SCSI target\n");
910 scsi_target_unblock(&session->dev); 910 scsi_target_unblock(&session->dev, SDEV_TRANSPORT_OFFLINE);
911 ISCSI_DBG_TRANS_SESSION(session, "Completed unblocking SCSI target\n"); 911 ISCSI_DBG_TRANS_SESSION(session, "Completed unblocking SCSI target\n");
912} 912}
913 913
@@ -930,7 +930,7 @@ static void __iscsi_unblock_session(struct work_struct *work)
930 session->state = ISCSI_SESSION_LOGGED_IN; 930 session->state = ISCSI_SESSION_LOGGED_IN;
931 spin_unlock_irqrestore(&session->lock, flags); 931 spin_unlock_irqrestore(&session->lock, flags);
932 /* start IO */ 932 /* start IO */
933 scsi_target_unblock(&session->dev); 933 scsi_target_unblock(&session->dev, SDEV_RUNNING);
934 /* 934 /*
935 * Only do kernel scanning if the driver is properly hooked into 935 * Only do kernel scanning if the driver is properly hooked into
936 * the async scanning code (drivers like iscsi_tcp do login and 936 * the async scanning code (drivers like iscsi_tcp do login and
@@ -1180,7 +1180,7 @@ void iscsi_remove_session(struct iscsi_cls_session *session)
1180 session->state = ISCSI_SESSION_FREE; 1180 session->state = ISCSI_SESSION_FREE;
1181 spin_unlock_irqrestore(&session->lock, flags); 1181 spin_unlock_irqrestore(&session->lock, flags);
1182 1182
1183 scsi_target_unblock(&session->dev); 1183 scsi_target_unblock(&session->dev, SDEV_TRANSPORT_OFFLINE);
1184 /* flush running scans then delete devices */ 1184 /* flush running scans then delete devices */
1185 scsi_flush_work(shost); 1185 scsi_flush_work(shost);
1186 __iscsi_unbind_session(&session->unbind_work); 1186 __iscsi_unbind_session(&session->unbind_work);