[tulip] race condition leading to hung tx queue in .92, .93
Chris Friesen
cfriesen@nortelnetworks.com
Tue Feb 19 12:55:00 2002
Donald Becker wrote:
>
> On Fri, 15 Feb 2002, Chris Friesen wrote:
> > The fix is to change this code to the following:
> >
> > if ( ! tp->tx_full)
> > netif_unpause_tx_queue(dev);
> > else {
> > netif_stop_tx_queue(dev);
> >
> > /* handle case of tulip_interrupt() running under our feet */
> > if ( ! tp->tx_full)
> > netif_start_tx_queue(dev);
> > }
>
> Correct, although the preferred call is
> netif_resume_tx_queue(dev)
> The
> netif_start_tx_queue(dev);
> call currently does the same thing, but is intended to be used when the
> interface is first started.
The reason that I used netif_start_tx_queue() was that we're using
netif_stop_tx_queue() to stop it. If we use netif_resume_tx_queue(), we'll be
left with dev->start set to zero.
I don't know if this is a problem, but it seems to me that we should use
matching sleep/wake routines, so either stop/start or pause/resume.
--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com