On 11/10/2010 05:04 PM, Eddie Wai wrote:
case NETDEV_GOING_DOWN:
- set_bit(ADAPTER_STATE_GOING_DOWN,&hba->adapter_state);
- iscsi_host_for_each_session(hba->shost,
- bnx2i_drop_session);
+ /* Suspend all data transmissions */
+ for (i = 0; i< hba->max_active_conns; i++) {
+ bnx2i_conn = bnx2i_get_conn_from_id(hba, i);
+ if (bnx2i_conn) {
+ conn = bnx2i_conn->cls_conn->dd_data;
+ session = conn->session;
+ spin_lock_irqsave(&session->lock, flags);
+ bnx2i_conn->prev_sess_state = session->state;
+ if (conn->stop_stage == 0)
+ session->state = ISCSI_STATE_FAILED;
+ spin_unlock_irqrestore(&session->lock, flags);
+ iscsi_suspend_queue(conn);
+ set_bit(ISCSI_SUSPEND_BIT,&conn->suspend_rx);
How do you go from going down to down? What happens (does net layer
shutdown connections running and have the net driver clean something
up)? How long does it take?
You should not be digging into the session state and conn stop_stage and
probably the suspend_rx bit.
Add some libiscsi function that just calls something like
iscsi_conn_failure that does not initiate recovery. So basically just mv
everything but the iscsi_conn_error_event call in iscsi_conn_failure to
some new function iscsi_conn_suspend. Have iscsi_conn_failure call
iscsi_conn_suspend and iscsi_conn_error_event, and then have your driver
call iscsi_conn_suspend.
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/open-iscsi?hl=en.