Subject: Re: Lots of "BUG eth1 code -5 qlen 0" messages in 2.6.24

From: Erik Mouw <[email-masked]>
Date: Fri, 1 Feb 2008 15:54:47 +0100

On Tue, Jan 29, 2008 at 06:08:28PM -0500, jamal wrote:
> On Tue, 2008-29-01 at 22:45 +0100, Erik Mouw wrote:
> 
> > > The driver seems buggy. Make it return NETDEV_TX_BUSY instead of -EIO
> > > in xircom_start_xmit() and the messages will go away.
> > 
> > Like this?
> > 
> 
> Indeed. 

I've changed the -EIO into NETDEV_TX_BUSY and so far I can't trigger
the bug anymore. It was quite easy to trigger within minutes with
rsync, but I can't trigger it anymore. Should I send a patch, and if
so: to who? The tulip/xircom_cb driver seems to be orphaned.

> Peter, I suspect that driver is just buggy in some other way as opposed
> to being re-entered; couldnt tell by inspection. It is possible it may
> be too eager to open up before it really has space.
> It will be easy to check your theory by having the driver just check if
> it is netif_stopped just before it returns NETDEV_TX_BUSY.

No need to test that, it *is* netif_stopped before the return:

        /* Uh oh... no free descriptor... drop the packet */
        netif_stop_queue(dev);
        spin_unlock_irqrestore(&card->lock,flags);
        trigger_transmit(card);

        return NETDEV_TX_BUSY;

trigger_transmit() is a simple function that just writes a single
register on the card to trigger a transmit.

Erik

-- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery