Patchwork [2/9] lcs: invalid return codes from hard_start_xmit.

login
register
mail settings
Submitter Ursula Braun
Date March 24, 2009, 1:27 p.m.
Message ID <20090324133048.969199000@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/24962/
State Accepted
Delegated to: David Miller
Headers show

Comments

Ursula Braun - March 24, 2009, 1:27 p.m.
From: Klaus-Dieter Wacker <kdwacker@de.ibm.com>

Lcs hard_start_xmit routine issued return codes other than
defined for this interface. Now lcs returns only either
NETDEV_TX_OK or NETDEV_TX_BUSY.

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

 drivers/s390/net/lcs.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/lcs.c linux-2.6-patched/drivers/s390/net/lcs.c
--- linux-2.6/drivers/s390/net/lcs.c	2009-03-04 15:58:28.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/lcs.c	2009-03-04 15:58:29.000000000 +0100
@@ -1562,7 +1562,7 @@  __lcs_start_xmit(struct lcs_card *card, 
 	if (skb == NULL) {
 		card->stats.tx_dropped++;
 		card->stats.tx_errors++;
-		return -EIO;
+		return 0;
 	}
 	if (card->state != DEV_STATE_UP) {
 		dev_kfree_skb(skb);
@@ -1587,7 +1587,7 @@  __lcs_start_xmit(struct lcs_card *card, 
 		card->tx_buffer = lcs_get_buffer(&card->write);
 		if (card->tx_buffer == NULL) {
 			card->stats.tx_dropped++;
-			rc = -EBUSY;
+			rc = NETDEV_TX_BUSY;
 			goto out;
 		}
 		card->tx_buffer->callback = lcs_txbuffer_cb;