netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xircom_cb should return NETDEV_TX_BUSY when there are no descriptors available
@ 2008-02-04 17:56 Erik Mouw
  2008-02-04 21:20 ` Erik Mouw
  2008-02-05 18:33 ` Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Erik Mouw @ 2008-02-04 17:56 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, Waskiewicz Jr, Peter P, jamal

[-- Attachment #1: Type: text/plain, Size: 886 bytes --]

Hi,

Changes in other networking paths uncovered a bug in the xircom_cb
driver which made the kernel spew lots of the following error messages:

  BUG eth1 code -5 qlen 0

It turned out that the driver returned -EIO when there was no
descriptor available for sending packets. It should return
NETDEV_TX_BUSY instead. This was discussed on the netdev list before,
see http://thread.gmane.org/gmane.linux.network/84603 .

Signed-off-by: Erik Mouw <mouw@nl.linux.org>

diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c
index 8fc7274..6b93d01 100644
--- a/drivers/net/tulip/xircom_cb.c
+++ b/drivers/net/tulip/xircom_cb.c
@@ -441,7 +441,7 @@ static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	spin_unlock_irqrestore(&card->lock,flags);
 	trigger_transmit(card);
 
-	return -EIO;
+	return NETDEV_TX_BUSY;
 }
 
 


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xircom_cb should return NETDEV_TX_BUSY when there are no descriptors available
  2008-02-04 17:56 [PATCH] xircom_cb should return NETDEV_TX_BUSY when there are no descriptors available Erik Mouw
@ 2008-02-04 21:20 ` Erik Mouw
  2008-02-04 22:31   ` Jeff Garzik
  2008-02-05 18:33 ` Jeff Garzik
  1 sibling, 1 reply; 4+ messages in thread
From: Erik Mouw @ 2008-02-04 21:20 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, Waskiewicz Jr, Peter P, jamal

[-- Attachment #1: Type: text/plain, Size: 874 bytes --]

On Mon, Feb 04, 2008 at 06:56:54PM +0100, Erik Mouw wrote:
> Changes in other networking paths uncovered a bug in the xircom_cb
> driver which made the kernel spew lots of the following error messages:
> 
>   BUG eth1 code -5 qlen 0
> 
> It turned out that the driver returned -EIO when there was no
> descriptor available for sending packets. It should return
> NETDEV_TX_BUSY instead. This was discussed on the netdev list before,
> see http://thread.gmane.org/gmane.linux.network/84603 .
> 
> Signed-off-by: Erik Mouw <mouw@nl.linux.org>

Forgot to tell: the patch is against 2.6.24 but should apply cleanly to
the latest git kernel. The xircom_cb driver appears to be orphaned so
I've send the patch to you.


Erik

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xircom_cb should return NETDEV_TX_BUSY when there are no descriptors available
  2008-02-04 21:20 ` Erik Mouw
@ 2008-02-04 22:31   ` Jeff Garzik
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2008-02-04 22:31 UTC (permalink / raw)
  To: Erik Mouw; +Cc: netdev, Waskiewicz Jr, Peter P, jamal

Erik Mouw wrote:
> On Mon, Feb 04, 2008 at 06:56:54PM +0100, Erik Mouw wrote:
>> Changes in other networking paths uncovered a bug in the xircom_cb
>> driver which made the kernel spew lots of the following error messages:
>>
>>   BUG eth1 code -5 qlen 0
>>
>> It turned out that the driver returned -EIO when there was no
>> descriptor available for sending packets. It should return
>> NETDEV_TX_BUSY instead. This was discussed on the netdev list before,
>> see http://thread.gmane.org/gmane.linux.network/84603 .
>>
>> Signed-off-by: Erik Mouw <mouw@nl.linux.org>
> 
> Forgot to tell: the patch is against 2.6.24 but should apply cleanly to
> the latest git kernel. The xircom_cb driver appears to be orphaned so
> I've send the patch to you.

Yep, that's the right thing to do...

	Jeff




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xircom_cb should return NETDEV_TX_BUSY when there are no descriptors available
  2008-02-04 17:56 [PATCH] xircom_cb should return NETDEV_TX_BUSY when there are no descriptors available Erik Mouw
  2008-02-04 21:20 ` Erik Mouw
@ 2008-02-05 18:33 ` Jeff Garzik
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2008-02-05 18:33 UTC (permalink / raw)
  To: Erik Mouw; +Cc: netdev, Waskiewicz Jr, Peter P, jamal

Erik Mouw wrote:
> Hi,
> 
> Changes in other networking paths uncovered a bug in the xircom_cb
> driver which made the kernel spew lots of the following error messages:
> 
>   BUG eth1 code -5 qlen 0
> 
> It turned out that the driver returned -EIO when there was no
> descriptor available for sending packets. It should return
> NETDEV_TX_BUSY instead. This was discussed on the netdev list before,
> see http://thread.gmane.org/gmane.linux.network/84603 .
> 
> Signed-off-by: Erik Mouw <mouw@nl.linux.org>
> 
> diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c
> index 8fc7274..6b93d01 100644
> --- a/drivers/net/tulip/xircom_cb.c
> +++ b/drivers/net/tulip/xircom_cb.c
> @@ -441,7 +441,7 @@ static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  	spin_unlock_irqrestore(&card->lock,flags);
>  	trigger_transmit(card);
>  
> -	return -EIO;
> +	return NETDEV_TX_BUSY;
>  }
>  
>  


applied



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-05 18:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-04 17:56 [PATCH] xircom_cb should return NETDEV_TX_BUSY when there are no descriptors available Erik Mouw
2008-02-04 21:20 ` Erik Mouw
2008-02-04 22:31   ` Jeff Garzik
2008-02-05 18:33 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).