Re: mdelay causes BUG, please use udelay

Jeff Garzik
2002-08-21T00:55:23Z

Feldman, Scott wrote:
>>- msec_delay(10);
>>+ usec_delay(10000);
>
>
> Jeff, 10000 seems on the border of what's OK. If it's acceptable, then
> let's go for that. Otherwise, we're going to have to chain several
> mod_timer callbacks together to do a controller reset.

That definitely wants fixing. Since I like doing resets and similar
slow-paths in process context -- sleep for as long as you want -- I
would say kick over to a function called via schedule_task()

Just make sure other parts of the driver that may be called
asynchronously, such as ethtool ioctls, are disabled. Remember that
tx_timeout holds the dev->xmit_lock as well, so spending a long time in
there is a bad idea in general.

I would probably call netif_carrier_off() first thing in tx_timeout, too.

Jeff