Thread (2 messages) flat view 2 messages, 2 authors, 2007-10-18

Re: [PATCH/RFA] sch_generic: fix carrier-on bug?

From: David Miller <davem@davemloft.net>
Date: 2007-10-18 06:26:10
Also in: lkml

From: Jeff Garzik <redacted>
Date: Tue, 16 Oct 2007 17:55:55 -0400
While looking at a net driver with the following construct,

	if (!netif_carrier_ok(dev))
		netif_carrier_on(dev);

it stuck me that the netif_carrier_ok() check was redundant, since
netif_carrier_on() checks bit __LINK_STATE_NOCARRIER anyway.  This is
the same reason why netif_queue_stopped() need not be called prior to
netif_wake_queue().

This is true, but there is however an unwanted side effect from assuming
that netif_carrier_on() can be called multiple times:  it touches the
watchdog, regardless of pre-existing carrier state.

The fix:  move watchdog-up inside the bit-cleared code path.

Signed-off-by: Jeff Garzik <redacted>
I see no problems with this patch, I'll apply it, thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help