Thread (12 messages) flat view 12 messages, 4 authors, 2011-06-22

Re: [PATCH net-next 5/7] qlcnic: fix default operating state of interface

From: Anirban Chakraborty <hidden>
Date: 2011-06-20 04:14:47

On Jun 16, 2011, at 9:10 PM, David Miller wrote:
From: Anirban Chakraborty <redacted>
Date: Thu, 16 Jun 2011 13:37:36 -0700
quoted
From: Amit Kumar Salecha <redacted>

Currently interface shows status as RUNNING, even if there is no link.
To fix this, netif_carrier_off should be called after register_netdev().

netif_carrier_off calls linkwatch_fire_event(dev); only if netdev is registered,
otherwise it skips. linkwatch_fire_event set default state of nic interface.

Signed-off-by: Amit Kumar Salecha <redacted>
Signed-off-by: Anirban Chakraborty <redacted>
You cannot do this.

The exact second that register_netdev() is called, the device can
be brought up asynchronously and the link brought into the up state.

Your netif_carrier_off() call will race with this.

This is why no other (properly functioning) driver does what you're
trying to do here.
We will take care of it. Please ignore the series. 

thanks much,
Anirban


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help