Skip to contentSkip to conversation

xircom_cb should return NETDEV_TX_BUSY when there are no descriptors available

PATCH Applied Erik Mouw 2 participants 4 messages Feb 4, 2008 – Feb 5, 2008

Subsystems (2)
lore
Share & tools
lore

Erik Mouw

author
#0 lore raw

PATCH 1/1 xircom_cb should return NETDEV_TX_BUSY when there are no descriptors available

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 .

drivers/net/tulip/xircom_cb.c +1 -1
index 8fc7274..6b93d01 100644
@@ -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;
 }
 
 
author
#1 lore raw
Quoted 11 lines · Erik Mouw

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 .

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

Signature · 2 lines
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
#2 lore raw
Quoted 11 lines · Erik Mouw
Quoted 10 lines · Erik Mouw

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 .

Quoted 5 lines
Quoted 1 line

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

Applied
#3 lore raw
In reply to Erik Mouw
Quoted 19 lines · Erik Mouw

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 .

drivers/net/tulip/xircom_cb.c +0 -0
index 8fc7274..6b93d01 100644

drivers/net/tulip/xircom_cb.c static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev) · line 447

Quoted 8 lines
drivers/net/tulip/xircom_cb.c +1 -1
@@ -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