Frequent spurious tx_timeouts for libertas

Ben Hutchings bhutchings at solarflare.com
Tue May 3 12:47:40 EDT 2011


On Mon, 2011-05-02 at 03:24 +0100, Ben Hutchings wrote:
[...]
> And now, for the specific case of libertas:
> 
> It appears that libertas reports carrier off (link down) while scanning,
> so that should mean the watchdog does not fire.  However:
> 
> 1. The watchdog will only check the current link state, which might be
> up again when it runs.
[...]

However, netif_carrier_on() will reset the watchdog timer, so the link
really does have to be reported up continuously for 5 seconds before the
watchdog will fire.

There is a small race condition though...

void netif_carrier_on(struct net_device *dev)
{
	if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) {
/*
 * If the device is running and the link has been down for exactly
 * dev->watchdog_timeo ticks, the watchdog can fire now.
 */
		if (dev->reg_state == NETREG_UNINITIALIZED)
			return;
		linkwatch_fire_event(dev);
		if (netif_running(dev))
/*
 * The watchdog timer is reset here:
 */
			__netdev_watchdog_up(dev);
	}
}

However, given the timing of channel scanning that you described, I
don't think this would explain the watchdog firing for libertas.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.




More information about the libertas-dev mailing list