Patchwork [5/9] ctcm: invalid return code from hard_start_xmit

login
register
mail settings
Submitter Ursula Braun
Date March 24, 2009, 12:29 p.m.
Message ID <20090324124335.930878000@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/24954/
State Superseded
Delegated to: David Miller
Headers show

Comments

Ursula Braun - March 24, 2009, 12:29 p.m.
From: Ursula Braun <ursula.braun@de.ibm.com>

Avoid kernel warning by using the correct hard_start_xmit return
code NETDEV_TX_BUSY for skb requeuing.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
---

 drivers/s390/net/ctcm_main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff -urpN linux-2.6/drivers/s390/net/ctcm_main.c linux-2.6-patched/drivers/s390/net/ctcm_main.c
--- linux-2.6/drivers/s390/net/ctcm_main.c	2009-03-04 15:58:03.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/ctcm_main.c	2009-03-04 15:58:31.000000000 +0100
@@ -906,11 +906,11 @@  static int ctcm_tx(struct sk_buff *skb, 
 	}
 
 	if (ctcm_test_and_set_busy(dev))
-		return -EBUSY;
+		return NETDEV_TX_BUSY;
 
 	dev->trans_start = jiffies;
 	if (ctcm_transmit_skb(priv->channel[WRITE], skb) != 0)
-		return 1;
+		return NETDEV_TX_BUSY;
 	return 0;
 }