Subject: Re: [ PATCH 1/1 2.6.25-rc9] bnx2: Add EEH support in bnx2x driver

From: "Michael Chan" <[email-masked]>
Date: Tue, 22 Apr 2008 14:46:31 -0700

On Tue, 2008-04-22 at 14:44 -0500, wendy xiong wrote:
> >Shouldn't we attach first before netif_start?
> 
> From my understanding, network interface function dev->open will call
> device driver's open function to initialize internal data structures
> and
> enable interrupt, then driver starts the receive queue by calling
> netif_start_queue.
> 
> Looks bnx2_netif_start() enables hardware interrupt and receive
> polling
> interrupt. So I think we can do netif_device_attach after
> bnx2_netif_start() according to dev->open route concept.
> 

I think it doesn't make a whole lot of difference either way, especially
if you hold the rtnl_lock().  But in the normal course of loading the
driver, the LINK_STATE_PRESENT bit gets set during ->probe() when the
driver calls register_netdev().  So it is attached before ->open().