sfc: Fix ordering of device registration and initial netif_carrier_off()
authorBen Hutchings <bhutchings@solarflare.com>
Wed, 26 Aug 2009 08:16:27 +0000 (08:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Aug 2009 00:38:49 +0000 (17:38 -0700)
commitaed0628dae0c26b47d40d65f942abe30279b52a5
treec6525e610300eb43f138bb9c14ee9ef1f8693f0c
parent7c6a3ed5bd61ec981c8a0d0111cfd435adf3f2b7
sfc: Fix ordering of device registration and initial netif_carrier_off()

We must call netif_carrier_off() after the device is registered, not
before, to set the operational state and user-space IFF_RUNNING flag
correctly.

Since we don't want observers to see an intermediate state, open-code
register_netdev() and add efx_update_name() and netif_carrier_off()
into the locked region.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sfc/efx.c