Re: [PATCH 04/16] BNX2I: Updated the handling of NETEVENTs to alleviate recovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-11-17 at 19:14 -0800, Mike Christie wrote:
> 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?

net layer will just stop transmitting on devices that are down.  But
with iSCSI connections offloaded to our chips, these connections must be
terminated and deleted before the net driver resets the chip.
Otherwise, the chip won't come up correctly after reset.

> 
> 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.
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux