diff options
Diffstat (limited to 'drivers')
97 files changed, 142 insertions, 167 deletions
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index cb8943da4f12..34d54e7281fd 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -1069,7 +1069,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb) | |||
1069 | lp = isdn_net_get_locked_lp(nd); | 1069 | lp = isdn_net_get_locked_lp(nd); |
1070 | if (!lp) { | 1070 | if (!lp) { |
1071 | printk(KERN_WARNING "%s: all channels busy - requeuing!\n", ndev->name); | 1071 | printk(KERN_WARNING "%s: all channels busy - requeuing!\n", ndev->name); |
1072 | return 1; | 1072 | return NETDEV_TX_BUSY; |
1073 | } | 1073 | } |
1074 | /* we have our lp locked from now on */ | 1074 | /* we have our lp locked from now on */ |
1075 | 1075 | ||
@@ -1273,14 +1273,14 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
1273 | spin_unlock_irqrestore(&dev->lock, flags); | 1273 | spin_unlock_irqrestore(&dev->lock, flags); |
1274 | isdn_net_dial(); /* Initiate dialing */ | 1274 | isdn_net_dial(); /* Initiate dialing */ |
1275 | netif_stop_queue(ndev); | 1275 | netif_stop_queue(ndev); |
1276 | return 1; /* let upper layer requeue skb packet */ | 1276 | return NETDEV_TX_BUSY; /* let upper layer requeue skb packet */ |
1277 | } | 1277 | } |
1278 | #endif | 1278 | #endif |
1279 | /* Initiate dialing */ | 1279 | /* Initiate dialing */ |
1280 | spin_unlock_irqrestore(&dev->lock, flags); | 1280 | spin_unlock_irqrestore(&dev->lock, flags); |
1281 | isdn_net_dial(); | 1281 | isdn_net_dial(); |
1282 | isdn_net_device_stop_queue(lp); | 1282 | isdn_net_device_stop_queue(lp); |
1283 | return 1; | 1283 | return NETDEV_TX_BUSY; |
1284 | } else { | 1284 | } else { |
1285 | isdn_net_unreachable(ndev, skb, | 1285 | isdn_net_unreachable(ndev, skb, |
1286 | "No phone number"); | 1286 | "No phone number"); |
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c index c2804f26cb44..a9e48e28b1dc 100644 --- a/drivers/message/fusion/mptlan.c +++ b/drivers/message/fusion/mptlan.c | |||
@@ -703,7 +703,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev) | |||
703 | 703 | ||
704 | printk (KERN_ERR "%s: no tx context available: %u\n", | 704 | printk (KERN_ERR "%s: no tx context available: %u\n", |
705 | __func__, priv->mpt_txfidx_tail); | 705 | __func__, priv->mpt_txfidx_tail); |
706 | return 1; | 706 | return NETDEV_TX_BUSY; |
707 | } | 707 | } |
708 | 708 | ||
709 | mf = mpt_get_msg_frame(LanCtx, mpt_dev); | 709 | mf = mpt_get_msg_frame(LanCtx, mpt_dev); |
@@ -713,7 +713,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev) | |||
713 | 713 | ||
714 | printk (KERN_ERR "%s: Unable to alloc request frame\n", | 714 | printk (KERN_ERR "%s: Unable to alloc request frame\n", |
715 | __func__); | 715 | __func__); |
716 | return 1; | 716 | return NETDEV_TX_BUSY; |
717 | } | 717 | } |
718 | 718 | ||
719 | ctx = priv->mpt_txfidx[priv->mpt_txfidx_tail--]; | 719 | ctx = priv->mpt_txfidx[priv->mpt_txfidx_tail--]; |
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c index 6faefcffcb53..8d1c60a3f0df 100644 --- a/drivers/misc/sgi-xp/xpnet.c +++ b/drivers/misc/sgi-xp/xpnet.c | |||
@@ -450,7 +450,8 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
450 | "packet\n", sizeof(struct xpnet_pending_msg)); | 450 | "packet\n", sizeof(struct xpnet_pending_msg)); |
451 | 451 | ||
452 | dev->stats.tx_errors++; | 452 | dev->stats.tx_errors++; |
453 | return -ENOMEM; | 453 | dev_kfree_skb(skb); |
454 | return NETDEV_TX_OK; | ||
454 | } | 455 | } |
455 | 456 | ||
456 | /* get the beginning of the first cacheline and end of last */ | 457 | /* get the beginning of the first cacheline and end of last */ |
diff --git a/drivers/net/3c505.c b/drivers/net/3c505.c index b28499459cd6..f71b35402755 100644 --- a/drivers/net/3c505.c +++ b/drivers/net/3c505.c | |||
@@ -1088,7 +1088,7 @@ static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1088 | pr_debug("%s: failed to transmit packet\n", dev->name); | 1088 | pr_debug("%s: failed to transmit packet\n", dev->name); |
1089 | } | 1089 | } |
1090 | spin_unlock_irqrestore(&adapter->lock, flags); | 1090 | spin_unlock_irqrestore(&adapter->lock, flags); |
1091 | return 1; | 1091 | return NETDEV_TX_BUSY; |
1092 | } | 1092 | } |
1093 | if (elp_debug >= 3) | 1093 | if (elp_debug >= 3) |
1094 | pr_debug("%s: packet of length %d sent\n", dev->name, (int) skb->len); | 1094 | pr_debug("%s: packet of length %d sent\n", dev->name, (int) skb->len); |
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index 7fd0ff743757..3e00fa8ea65f 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c | |||
@@ -1014,7 +1014,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb, | |||
1014 | int i; | 1014 | int i; |
1015 | 1015 | ||
1016 | if (vp->tx_full) /* No room to transmit with */ | 1016 | if (vp->tx_full) /* No room to transmit with */ |
1017 | return 1; | 1017 | return NETDEV_TX_BUSY; |
1018 | if (vp->cur_tx != 0) | 1018 | if (vp->cur_tx != 0) |
1019 | prev_entry = &vp->tx_ring[(vp->cur_tx - 1) % TX_RING_SIZE]; | 1019 | prev_entry = &vp->tx_ring[(vp->cur_tx - 1) % TX_RING_SIZE]; |
1020 | else | 1020 | else |
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c index c10ca30458f6..aaa8a9f405d4 100644 --- a/drivers/net/3c527.c +++ b/drivers/net/3c527.c | |||
@@ -1030,7 +1030,7 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1030 | netif_stop_queue(dev); | 1030 | netif_stop_queue(dev); |
1031 | 1031 | ||
1032 | if(atomic_read(&lp->tx_count)==0) { | 1032 | if(atomic_read(&lp->tx_count)==0) { |
1033 | return 1; | 1033 | return NETDEV_TX_BUSY; |
1034 | } | 1034 | } |
1035 | 1035 | ||
1036 | if (skb_padto(skb, ETH_ZLEN)) { | 1036 | if (skb_padto(skb, ETH_ZLEN)) { |
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index a6e8a2da3bcd..c34aee91250b 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -2107,7 +2107,7 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2107 | pr_warning("%s: BUG! Tx Ring full, refusing to send buffer.\n", | 2107 | pr_warning("%s: BUG! Tx Ring full, refusing to send buffer.\n", |
2108 | dev->name); | 2108 | dev->name); |
2109 | netif_stop_queue(dev); | 2109 | netif_stop_queue(dev); |
2110 | return 1; | 2110 | return NETDEV_TX_BUSY; |
2111 | } | 2111 | } |
2112 | 2112 | ||
2113 | vp->tx_skbuff[entry] = skb; | 2113 | vp->tx_skbuff[entry] = skb; |
diff --git a/drivers/net/7990.c b/drivers/net/7990.c index 7a331acc34ad..69f5b7d298a6 100644 --- a/drivers/net/7990.c +++ b/drivers/net/7990.c | |||
@@ -541,7 +541,7 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
541 | unsigned long flags; | 541 | unsigned long flags; |
542 | 542 | ||
543 | if (!TX_BUFFS_AVAIL) | 543 | if (!TX_BUFFS_AVAIL) |
544 | return -1; | 544 | return NETDEV_TX_LOCKED; |
545 | 545 | ||
546 | netif_stop_queue (dev); | 546 | netif_stop_queue (dev); |
547 | 547 | ||
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index c9fc0ff14a4d..50efde11ea6c 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -756,7 +756,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
756 | spin_unlock_irqrestore(&cp->lock, intr_flags); | 756 | spin_unlock_irqrestore(&cp->lock, intr_flags); |
757 | pr_err(PFX "%s: BUG! Tx Ring full when queue awake!\n", | 757 | pr_err(PFX "%s: BUG! Tx Ring full when queue awake!\n", |
758 | dev->name); | 758 | dev->name); |
759 | return 1; | 759 | return NETDEV_TX_BUSY; |
760 | } | 760 | } |
761 | 761 | ||
762 | #if CP_VLAN_TAG_USED | 762 | #if CP_VLAN_TAG_USED |
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c index 02f64d578641..85a18175730b 100644 --- a/drivers/net/a2065.c +++ b/drivers/net/a2065.c | |||
@@ -564,7 +564,7 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
564 | 564 | ||
565 | if (!TX_BUFFS_AVAIL){ | 565 | if (!TX_BUFFS_AVAIL){ |
566 | local_irq_restore(flags); | 566 | local_irq_restore(flags); |
567 | return -1; | 567 | return NETDEV_TX_LOCKED; |
568 | } | 568 | } |
569 | 569 | ||
570 | #ifdef DEBUG_DRIVER | 570 | #ifdef DEBUG_DRIVER |
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c index 7f4bc8ae5462..2e7419a61191 100644 --- a/drivers/net/arm/at91_ether.c +++ b/drivers/net/arm/at91_ether.c | |||
@@ -829,7 +829,7 @@ static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
829 | dev->trans_start = jiffies; | 829 | dev->trans_start = jiffies; |
830 | } else { | 830 | } else { |
831 | printk(KERN_ERR "at91_ether.c: at91ether_start_xmit() called, but device is busy!\n"); | 831 | printk(KERN_ERR "at91_ether.c: at91ether_start_xmit() called, but device is busy!\n"); |
832 | return 1; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb) | 832 | return NETDEV_TX_BUSY; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb) |
833 | on this skb, he also reports -ENETDOWN and printk's, so either | 833 | on this skb, he also reports -ENETDOWN and printk's, so either |
834 | we free and return(0) or don't free and return 1 */ | 834 | we free and return(0) or don't free and return 1 */ |
835 | } | 835 | } |
diff --git a/drivers/net/arm/ether3.c b/drivers/net/arm/ether3.c index ec8a1ae1e887..455037134aa3 100644 --- a/drivers/net/arm/ether3.c +++ b/drivers/net/arm/ether3.c | |||
@@ -526,7 +526,7 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev) | |||
526 | 526 | ||
527 | if (priv(dev)->tx_tail == next_ptr) { | 527 | if (priv(dev)->tx_tail == next_ptr) { |
528 | local_irq_restore(flags); | 528 | local_irq_restore(flags); |
529 | return 1; /* unable to queue */ | 529 | return NETDEV_TX_BUSY; /* unable to queue */ |
530 | } | 530 | } |
531 | 531 | ||
532 | dev->trans_start = jiffies; | 532 | dev->trans_start = jiffies; |
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index d58c105fc779..d3c734f4d679 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -957,7 +957,7 @@ static int au1000_tx(struct sk_buff *skb, struct net_device *dev) | |||
957 | /* We've wrapped around and the transmitter is still busy */ | 957 | /* We've wrapped around and the transmitter is still busy */ |
958 | netif_stop_queue(dev); | 958 | netif_stop_queue(dev); |
959 | aup->tx_full = 1; | 959 | aup->tx_full = 1; |
960 | return 1; | 960 | return NETDEV_TX_BUSY; |
961 | } | 961 | } |
962 | else if (buff_stat & TX_T_DONE) { | 962 | else if (buff_stat & TX_T_DONE) { |
963 | update_tx_stats(dev, ptxd->status); | 963 | update_tx_stats(dev, ptxd->status); |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index f5222764061c..eb066673c2a0 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -2934,7 +2934,7 @@ static int cas_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2934 | * individual queues. | 2934 | * individual queues. |
2935 | */ | 2935 | */ |
2936 | if (cas_xmit_tx_ringN(cp, ring++ & N_TX_RINGS_MASK, skb)) | 2936 | if (cas_xmit_tx_ringN(cp, ring++ & N_TX_RINGS_MASK, skb)) |
2937 | return 1; | 2937 | return NETDEV_TX_BUSY; |
2938 | dev->trans_start = jiffies; | 2938 | dev->trans_start = jiffies; |
2939 | return 0; | 2939 | return 0; |
2940 | } | 2940 | } |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 7433b88eed7e..3eee666a9cd2 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -1551,7 +1551,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1551 | 1551 | ||
1552 | spin_unlock_irq(&lp->lock); | 1552 | spin_unlock_irq(&lp->lock); |
1553 | if (net_debug) printk("cs89x0: Tx buffer not free!\n"); | 1553 | if (net_debug) printk("cs89x0: Tx buffer not free!\n"); |
1554 | return 1; | 1554 | return NETDEV_TX_BUSY; |
1555 | } | 1555 | } |
1556 | /* Write the contents of the packet */ | 1556 | /* Write the contents of the packet */ |
1557 | writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1); | 1557 | writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1); |
diff --git a/drivers/net/de600.c b/drivers/net/de600.c index c866ca99a068..e1af089064bc 100644 --- a/drivers/net/de600.c +++ b/drivers/net/de600.c | |||
@@ -168,14 +168,14 @@ static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
168 | if (free_tx_pages <= 0) { /* Do timeouts, to avoid hangs. */ | 168 | if (free_tx_pages <= 0) { /* Do timeouts, to avoid hangs. */ |
169 | tickssofar = jiffies - dev->trans_start; | 169 | tickssofar = jiffies - dev->trans_start; |
170 | if (tickssofar < 5) | 170 | if (tickssofar < 5) |
171 | return 1; | 171 | return NETDEV_TX_BUSY; |
172 | /* else */ | 172 | /* else */ |
173 | printk(KERN_WARNING "%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem"); | 173 | printk(KERN_WARNING "%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem"); |
174 | /* Restart the adapter. */ | 174 | /* Restart the adapter. */ |
175 | spin_lock_irqsave(&de600_lock, flags); | 175 | spin_lock_irqsave(&de600_lock, flags); |
176 | if (adapter_init(dev)) { | 176 | if (adapter_init(dev)) { |
177 | spin_unlock_irqrestore(&de600_lock, flags); | 177 | spin_unlock_irqrestore(&de600_lock, flags); |
178 | return 1; | 178 | return NETDEV_TX_BUSY; |
179 | } | 179 | } |
180 | spin_unlock_irqrestore(&de600_lock, flags); | 180 | spin_unlock_irqrestore(&de600_lock, flags); |
181 | } | 181 | } |
@@ -199,7 +199,7 @@ static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
199 | if (was_down || (de600_read_byte(READ_DATA, dev) != 0xde)) { | 199 | if (was_down || (de600_read_byte(READ_DATA, dev) != 0xde)) { |
200 | if (adapter_init(dev)) { | 200 | if (adapter_init(dev)) { |
201 | spin_unlock_irqrestore(&de600_lock, flags); | 201 | spin_unlock_irqrestore(&de600_lock, flags); |
202 | return 1; | 202 | return NETDEV_TX_BUSY; |
203 | } | 203 | } |
204 | } | 204 | } |
205 | } | 205 | } |
diff --git a/drivers/net/de620.c b/drivers/net/de620.c index 039bc1acadd3..55d2bb67cffa 100644 --- a/drivers/net/de620.c +++ b/drivers/net/de620.c | |||
@@ -531,7 +531,7 @@ static int de620_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
531 | case (TXBF0 | TXBF1): /* NONE!!! */ | 531 | case (TXBF0 | TXBF1): /* NONE!!! */ |
532 | printk(KERN_WARNING "%s: No tx-buffer available!\n", dev->name); | 532 | printk(KERN_WARNING "%s: No tx-buffer available!\n", dev->name); |
533 | spin_unlock_irqrestore(&de620_lock, flags); | 533 | spin_unlock_irqrestore(&de620_lock, flags); |
534 | return 1; | 534 | return NETDEV_TX_BUSY; |
535 | } | 535 | } |
536 | de620_write_block(dev, buffer, skb->len, len-skb->len); | 536 | de620_write_block(dev, buffer, skb->len, len-skb->len); |
537 | 537 | ||
diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c index 4ec055dc7174..102b8d439714 100644 --- a/drivers/net/defxx.c +++ b/drivers/net/defxx.c | |||
@@ -3318,7 +3318,7 @@ static int dfx_xmt_queue_pkt( | |||
3318 | { | 3318 | { |
3319 | skb_pull(skb,3); | 3319 | skb_pull(skb,3); |
3320 | spin_unlock_irqrestore(&bp->lock, flags); | 3320 | spin_unlock_irqrestore(&bp->lock, flags); |
3321 | return(1); /* requeue packet for later */ | 3321 | return NETDEV_TX_BUSY; /* requeue packet for later */ |
3322 | } | 3322 | } |
3323 | 3323 | ||
3324 | /* | 3324 | /* |
diff --git a/drivers/net/depca.c b/drivers/net/depca.c index 9301eb28d9e2..97ea2d6d3fe1 100644 --- a/drivers/net/depca.c +++ b/drivers/net/depca.c | |||
@@ -957,7 +957,7 @@ static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
957 | if (TX_BUFFS_AVAIL) | 957 | if (TX_BUFFS_AVAIL) |
958 | netif_start_queue(dev); | 958 | netif_start_queue(dev); |
959 | } else | 959 | } else |
960 | status = -1; | 960 | status = NETDEV_TX_LOCKED; |
961 | 961 | ||
962 | out: | 962 | out: |
963 | return status; | 963 | return status; |
@@ -1839,7 +1839,7 @@ static int load_packet(struct net_device *dev, struct sk_buff *skb) | |||
1839 | 1839 | ||
1840 | lp->tx_new = (++end) & lp->txRingMask; /* update current pointers */ | 1840 | lp->tx_new = (++end) & lp->txRingMask; /* update current pointers */ |
1841 | } else { | 1841 | } else { |
1842 | status = -1; | 1842 | status = NETDEV_TX_LOCKED; |
1843 | } | 1843 | } |
1844 | 1844 | ||
1845 | return status; | 1845 | return status; |
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index e402e91bf188..dd771dea6ae6 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -756,7 +756,7 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
756 | dm9000_dbg(db, 3, "%s:\n", __func__); | 756 | dm9000_dbg(db, 3, "%s:\n", __func__); |
757 | 757 | ||
758 | if (db->tx_pkt_cnt > 1) | 758 | if (db->tx_pkt_cnt > 1) |
759 | return 1; | 759 | return NETDEV_TX_BUSY; |
760 | 760 | ||
761 | spin_lock_irqsave(&db->lock, flags); | 761 | spin_lock_irqsave(&db->lock, flags); |
762 | 762 | ||
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 119dc5300f9d..e52a2018e91e 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -1716,7 +1716,7 @@ static int e100_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1716 | /* This is a hard error - log it. */ | 1716 | /* This is a hard error - log it. */ |
1717 | DPRINTK(TX_ERR, DEBUG, "Out of Tx resources, returning skb\n"); | 1717 | DPRINTK(TX_ERR, DEBUG, "Out of Tx resources, returning skb\n"); |
1718 | netif_stop_queue(netdev); | 1718 | netif_stop_queue(netdev); |
1719 | return 1; | 1719 | return NETDEV_TX_BUSY; |
1720 | } | 1720 | } |
1721 | 1721 | ||
1722 | netdev->trans_start = jiffies; | 1722 | netdev->trans_start = jiffies; |
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index 91a9b1a33764..ceb6a9c357ad 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c | |||
@@ -811,7 +811,7 @@ static int ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
811 | 811 | ||
812 | if (unlikely(skb->len > ETHOC_BUFSIZ)) { | 812 | if (unlikely(skb->len > ETHOC_BUFSIZ)) { |
813 | priv->stats.tx_errors++; | 813 | priv->stats.tx_errors++; |
814 | return -EMSGSIZE; | 814 | goto out; |
815 | } | 815 | } |
816 | 816 | ||
817 | entry = priv->cur_tx % priv->num_tx; | 817 | entry = priv->cur_tx % priv->num_tx; |
@@ -840,9 +840,9 @@ static int ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
840 | } | 840 | } |
841 | 841 | ||
842 | dev->trans_start = jiffies; | 842 | dev->trans_start = jiffies; |
843 | dev_kfree_skb(skb); | ||
844 | |||
845 | spin_unlock_irq(&priv->lock); | 843 | spin_unlock_irq(&priv->lock); |
844 | out: | ||
845 | dev_kfree_skb(skb); | ||
846 | return NETDEV_TX_OK; | 846 | return NETDEV_TX_OK; |
847 | } | 847 | } |
848 | 848 | ||
diff --git a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c index 1a685a04d4b2..1e9723281405 100644 --- a/drivers/net/ewrk3.c +++ b/drivers/net/ewrk3.c | |||
@@ -873,7 +873,7 @@ static int ewrk3_queue_pkt (struct sk_buff *skb, struct net_device *dev) | |||
873 | err_out: | 873 | err_out: |
874 | ENABLE_IRQs; | 874 | ENABLE_IRQs; |
875 | spin_unlock_irq (&lp->hw_lock); | 875 | spin_unlock_irq (&lp->hw_lock); |
876 | return 1; | 876 | return NETDEV_TX_BUSY; |
877 | } | 877 | } |
878 | 878 | ||
879 | /* | 879 | /* |
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 28db6919c526..0f19b743749b 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -290,7 +290,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
290 | 290 | ||
291 | if (!fep->link) { | 291 | if (!fep->link) { |
292 | /* Link is down or autonegotiation is in progress. */ | 292 | /* Link is down or autonegotiation is in progress. */ |
293 | return 1; | 293 | return NETDEV_TX_BUSY; |
294 | } | 294 | } |
295 | 295 | ||
296 | spin_lock_irqsave(&fep->hw_lock, flags); | 296 | spin_lock_irqsave(&fep->hw_lock, flags); |
@@ -305,7 +305,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
305 | */ | 305 | */ |
306 | printk("%s: tx queue full!.\n", dev->name); | 306 | printk("%s: tx queue full!.\n", dev->name); |
307 | spin_unlock_irqrestore(&fep->hw_lock, flags); | 307 | spin_unlock_irqrestore(&fep->hw_lock, flags); |
308 | return 1; | 308 | return NETDEV_TX_BUSY; |
309 | } | 309 | } |
310 | 310 | ||
311 | /* Clear all of the status flags */ | 311 | /* Clear all of the status flags */ |
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index 26151fa35df5..9d5b62cb30f7 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c | |||
@@ -1280,7 +1280,7 @@ static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1280 | status=readw(hmp->base + TxStatus); | 1280 | status=readw(hmp->base + TxStatus); |
1281 | if( !(status & 0x0001) || (status & 0x0002)) | 1281 | if( !(status & 0x0001) || (status & 0x0002)) |
1282 | writew(0x0001, hmp->base + TxCmd); | 1282 | writew(0x0001, hmp->base + TxCmd); |
1283 | return 1; | 1283 | return NETDEV_TX_BUSY; |
1284 | } | 1284 | } |
1285 | 1285 | ||
1286 | /* Caution: the write order is important here, set the field | 1286 | /* Caution: the write order is important here, set the field |
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index bb78c11559cd..5e4b7afd0683 100644 --- a/drivers/net/hamradio/baycom_epp.c +++ b/drivers/net/hamradio/baycom_epp.c | |||
@@ -777,7 +777,7 @@ static int baycom_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
777 | return 0; | 777 | return 0; |
778 | } | 778 | } |
779 | if (bc->skb) | 779 | if (bc->skb) |
780 | return -1; | 780 | return NETDEV_TX_LOCKED; |
781 | /* strip KISS byte */ | 781 | /* strip KISS byte */ |
782 | if (skb->len >= HDLCDRV_MAXFLEN+1 || skb->len < 3) { | 782 | if (skb->len >= HDLCDRV_MAXFLEN+1 || skb->len < 3) { |
783 | dev_kfree_skb(skb); | 783 | dev_kfree_skb(skb); |
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index d509b371a562..5105548ad50c 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -274,7 +274,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev) | |||
274 | if ((newskb = skb_realloc_headroom(skb, AX25_BPQ_HEADER_LEN)) == NULL) { | 274 | if ((newskb = skb_realloc_headroom(skb, AX25_BPQ_HEADER_LEN)) == NULL) { |
275 | printk(KERN_WARNING "bpqether: out of memory\n"); | 275 | printk(KERN_WARNING "bpqether: out of memory\n"); |
276 | kfree_skb(skb); | 276 | kfree_skb(skb); |
277 | return -ENOMEM; | 277 | return NETDEV_TX_OK; |
278 | } | 278 | } |
279 | 279 | ||
280 | if (skb->sk != NULL) | 280 | if (skb->sk != NULL) |
@@ -294,7 +294,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev) | |||
294 | if ((dev = bpq_get_ether_dev(dev)) == NULL) { | 294 | if ((dev = bpq_get_ether_dev(dev)) == NULL) { |
295 | dev->stats.tx_dropped++; | 295 | dev->stats.tx_dropped++; |
296 | kfree_skb(skb); | 296 | kfree_skb(skb); |
297 | return -ENODEV; | 297 | return NETDEV_TX_OK; |
298 | } | 298 | } |
299 | 299 | ||
300 | skb->protocol = ax25_type_trans(skb, dev); | 300 | skb->protocol = ax25_type_trans(skb, dev); |
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index 61de56e45eed..d034f8ca63cb 100644 --- a/drivers/net/hamradio/hdlcdrv.c +++ b/drivers/net/hamradio/hdlcdrv.c | |||
@@ -409,7 +409,7 @@ static int hdlcdrv_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
409 | return 0; | 409 | return 0; |
410 | } | 410 | } |
411 | if (sm->skb) | 411 | if (sm->skb) |
412 | return -1; | 412 | return NETDEV_TX_LOCKED; |
413 | netif_stop_queue(dev); | 413 | netif_stop_queue(dev); |
414 | sm->skb = skb; | 414 | sm->skb = skb; |
415 | return 0; | 415 | return 0; |
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 032c0db4c410..fda2fc83e9a1 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -531,7 +531,7 @@ static int ax_xmit(struct sk_buff *skb, struct net_device *dev) | |||
531 | 531 | ||
532 | if (!netif_running(dev)) { | 532 | if (!netif_running(dev)) { |
533 | printk(KERN_ERR "mkiss: %s: xmit call when iface is down\n", dev->name); | 533 | printk(KERN_ERR "mkiss: %s: xmit call when iface is down\n", dev->name); |
534 | return 1; | 534 | return NETDEV_TX_BUSY; |
535 | } | 535 | } |
536 | 536 | ||
537 | if (netif_queue_stopped(dev)) { | 537 | if (netif_queue_stopped(dev)) { |
@@ -541,7 +541,7 @@ static int ax_xmit(struct sk_buff *skb, struct net_device *dev) | |||
541 | */ | 541 | */ |
542 | if (time_before(jiffies, dev->trans_start + 20 * HZ)) { | 542 | if (time_before(jiffies, dev->trans_start + 20 * HZ)) { |
543 | /* 20 sec timeout not reached */ | 543 | /* 20 sec timeout not reached */ |
544 | return 1; | 544 | return NETDEV_TX_BUSY; |
545 | } | 545 | } |
546 | 546 | ||
547 | printk(KERN_ERR "mkiss: %s: transmit timed out, %s?\n", dev->name, | 547 | printk(KERN_ERR "mkiss: %s: transmit timed out, %s?\n", dev->name, |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 806533c831c7..beb84213b671 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -1484,7 +1484,7 @@ static int emac_start_xmit_sg(struct sk_buff *skb, struct net_device *ndev) | |||
1484 | stop_queue: | 1484 | stop_queue: |
1485 | netif_stop_queue(ndev); | 1485 | netif_stop_queue(ndev); |
1486 | DBG2(dev, "stopped TX queue" NL); | 1486 | DBG2(dev, "stopped TX queue" NL); |
1487 | return 1; | 1487 | return NETDEV_TX_BUSY; |
1488 | } | 1488 | } |
1489 | 1489 | ||
1490 | /* Tx lock BHs */ | 1490 | /* Tx lock BHs */ |
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c index c25bc0bc0b25..448098d3b39b 100644 --- a/drivers/net/ibmlana.c +++ b/drivers/net/ibmlana.c | |||
@@ -815,7 +815,7 @@ static int ibmlana_close(struct net_device *dev) | |||
815 | static int ibmlana_tx(struct sk_buff *skb, struct net_device *dev) | 815 | static int ibmlana_tx(struct sk_buff *skb, struct net_device *dev) |
816 | { | 816 | { |
817 | ibmlana_priv *priv = netdev_priv(dev); | 817 | ibmlana_priv *priv = netdev_priv(dev); |
818 | int retval = 0, tmplen, addr; | 818 | int tmplen, addr; |
819 | unsigned long flags; | 819 | unsigned long flags; |
820 | tda_t tda; | 820 | tda_t tda; |
821 | int baddr; | 821 | int baddr; |
@@ -824,7 +824,6 @@ static int ibmlana_tx(struct sk_buff *skb, struct net_device *dev) | |||
824 | the upper layer is in deep desperation and we simply ignore the frame. */ | 824 | the upper layer is in deep desperation and we simply ignore the frame. */ |
825 | 825 | ||
826 | if (priv->txusedcnt >= TXBUFCNT) { | 826 | if (priv->txusedcnt >= TXBUFCNT) { |
827 | retval = -EIO; | ||
828 | dev->stats.tx_dropped++; | 827 | dev->stats.tx_dropped++; |
829 | goto tx_done; | 828 | goto tx_done; |
830 | } | 829 | } |
@@ -874,7 +873,7 @@ static int ibmlana_tx(struct sk_buff *skb, struct net_device *dev) | |||
874 | spin_unlock_irqrestore(&priv->lock, flags); | 873 | spin_unlock_irqrestore(&priv->lock, flags); |
875 | tx_done: | 874 | tx_done: |
876 | dev_kfree_skb(skb); | 875 | dev_kfree_skb(skb); |
877 | return retval; | 876 | return NETDEV_TX_OK; |
878 | } | 877 | } |
879 | 878 | ||
880 | /* switch receiver mode. */ | 879 | /* switch receiver mode. */ |
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c index 269153eedd26..c4361d466597 100644 --- a/drivers/net/irda/au1k_ir.c +++ b/drivers/net/irda/au1k_ir.c | |||
@@ -512,13 +512,13 @@ static int au1k_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
512 | printk(KERN_DEBUG "%s: tx_full\n", dev->name); | 512 | printk(KERN_DEBUG "%s: tx_full\n", dev->name); |
513 | netif_stop_queue(dev); | 513 | netif_stop_queue(dev); |
514 | aup->tx_full = 1; | 514 | aup->tx_full = 1; |
515 | return 1; | 515 | return NETDEV_TX_BUSY; |
516 | } | 516 | } |
517 | else if (((aup->tx_head + 1) & (NUM_IR_DESC - 1)) == aup->tx_tail) { | 517 | else if (((aup->tx_head + 1) & (NUM_IR_DESC - 1)) == aup->tx_tail) { |
518 | printk(KERN_DEBUG "%s: tx_full\n", dev->name); | 518 | printk(KERN_DEBUG "%s: tx_full\n", dev->name); |
519 | netif_stop_queue(dev); | 519 | netif_stop_queue(dev); |
520 | aup->tx_full = 1; | 520 | aup->tx_full = 1; |
521 | return 1; | 521 | return NETDEV_TX_BUSY; |
522 | } | 522 | } |
523 | 523 | ||
524 | pDB = aup->tx_db_inuse[aup->tx_head]; | 524 | pDB = aup->tx_db_inuse[aup->tx_head]; |
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 6b6548b9fda0..9a0346e751ac 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
@@ -994,11 +994,11 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev) | |||
994 | 994 | ||
995 | /* change speed pending, wait for its execution */ | 995 | /* change speed pending, wait for its execution */ |
996 | if (self->new_speed) | 996 | if (self->new_speed) |
997 | return -EBUSY; | 997 | return NETDEV_TX_BUSY; |
998 | 998 | ||
999 | /* device stopped (apm) wait for restart */ | 999 | /* device stopped (apm) wait for restart */ |
1000 | if (self->stopped) | 1000 | if (self->stopped) |
1001 | return -EBUSY; | 1001 | return NETDEV_TX_BUSY; |
1002 | 1002 | ||
1003 | toshoboe_checkstuck (self); | 1003 | toshoboe_checkstuck (self); |
1004 | 1004 | ||
@@ -1049,7 +1049,7 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev) | |||
1049 | if (self->txpending) | 1049 | if (self->txpending) |
1050 | { | 1050 | { |
1051 | spin_unlock_irqrestore(&self->spinlock, flags); | 1051 | spin_unlock_irqrestore(&self->spinlock, flags); |
1052 | return -EBUSY; | 1052 | return NETDEV_TX_BUSY; |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | /* If in SIR mode we need to generate a string of XBOFs */ | 1055 | /* If in SIR mode we need to generate a string of XBOFs */ |
@@ -1105,7 +1105,7 @@ dumpbufs(skb->data,skb->len,'>'); | |||
1105 | ,skb->len, self->ring->tx[self->txs].control, self->txpending); | 1105 | ,skb->len, self->ring->tx[self->txs].control, self->txpending); |
1106 | toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX); | 1106 | toshoboe_start_DMA(self, OBOE_CONFIG0H_ENTX); |
1107 | spin_unlock_irqrestore(&self->spinlock, flags); | 1107 | spin_unlock_irqrestore(&self->spinlock, flags); |
1108 | return -EBUSY; | 1108 | return NETDEV_TX_BUSY; |
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | if (INB (OBOE_ENABLEH) & OBOE_ENABLEH_SIRON) | 1111 | if (INB (OBOE_ENABLEH) & OBOE_ENABLEH_SIRON) |
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 394b2b17075e..0c0831c03f64 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c | |||
@@ -389,7 +389,6 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
389 | s32 speed; | 389 | s32 speed; |
390 | s16 xbofs; | 390 | s16 xbofs; |
391 | int res, mtt; | 391 | int res, mtt; |
392 | int err = 1; /* Failed */ | ||
393 | 392 | ||
394 | IRDA_DEBUG(4, "%s() on %s\n", __func__, netdev->name); | 393 | IRDA_DEBUG(4, "%s() on %s\n", __func__, netdev->name); |
395 | 394 | ||
@@ -430,7 +429,6 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
430 | irda_usb_change_speed_xbofs(self); | 429 | irda_usb_change_speed_xbofs(self); |
431 | netdev->trans_start = jiffies; | 430 | netdev->trans_start = jiffies; |
432 | /* Will netif_wake_queue() in callback */ | 431 | /* Will netif_wake_queue() in callback */ |
433 | err = 0; /* No error */ | ||
434 | goto drop; | 432 | goto drop; |
435 | } | 433 | } |
436 | } | 434 | } |
@@ -542,7 +540,7 @@ drop: | |||
542 | /* Drop silently the skb and exit */ | 540 | /* Drop silently the skb and exit */ |
543 | dev_kfree_skb(skb); | 541 | dev_kfree_skb(skb); |
544 | spin_unlock_irqrestore(&self->lock, flags); | 542 | spin_unlock_irqrestore(&self->lock, flags); |
545 | return err; /* Usually 1 */ | 543 | return NETDEV_TX_OK; |
546 | } | 544 | } |
547 | 545 | ||
548 | /*------------------------------------------------------------------*/ | 546 | /*------------------------------------------------------------------*/ |
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c index 9d813bc4502e..c3e4e2c435ba 100644 --- a/drivers/net/irda/kingsun-sir.c +++ b/drivers/net/irda/kingsun-sir.c | |||
@@ -156,9 +156,6 @@ static int kingsun_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
156 | int wraplen; | 156 | int wraplen; |
157 | int ret = 0; | 157 | int ret = 0; |
158 | 158 | ||
159 | if (skb == NULL || netdev == NULL) | ||
160 | return -EINVAL; | ||
161 | |||
162 | netif_stop_queue(netdev); | 159 | netif_stop_queue(netdev); |
163 | 160 | ||
164 | /* the IRDA wrapping routines don't deal with non linear skb */ | 161 | /* the IRDA wrapping routines don't deal with non linear skb */ |
@@ -197,7 +194,7 @@ static int kingsun_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
197 | dev_kfree_skb(skb); | 194 | dev_kfree_skb(skb); |
198 | spin_unlock(&kingsun->lock); | 195 | spin_unlock(&kingsun->lock); |
199 | 196 | ||
200 | return ret; | 197 | return NETDEV_TX_OK; |
201 | } | 198 | } |
202 | 199 | ||
203 | /* Receive callback function */ | 200 | /* Receive callback function */ |
diff --git a/drivers/net/irda/ks959-sir.c b/drivers/net/irda/ks959-sir.c index b6ffe9715b61..d73b8b64fcb9 100644 --- a/drivers/net/irda/ks959-sir.c +++ b/drivers/net/irda/ks959-sir.c | |||
@@ -391,9 +391,6 @@ static int ks959_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
391 | unsigned int wraplen; | 391 | unsigned int wraplen; |
392 | int ret = 0; | 392 | int ret = 0; |
393 | 393 | ||
394 | if (skb == NULL || netdev == NULL) | ||
395 | return -EINVAL; | ||
396 | |||
397 | netif_stop_queue(netdev); | 394 | netif_stop_queue(netdev); |
398 | 395 | ||
399 | /* the IRDA wrapping routines don't deal with non linear skb */ | 396 | /* the IRDA wrapping routines don't deal with non linear skb */ |
@@ -428,7 +425,7 @@ static int ks959_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
428 | dev_kfree_skb(skb); | 425 | dev_kfree_skb(skb); |
429 | spin_unlock(&kingsun->lock); | 426 | spin_unlock(&kingsun->lock); |
430 | 427 | ||
431 | return ret; | 428 | return NETDEV_TX_OK; |
432 | } | 429 | } |
433 | 430 | ||
434 | /* Receive callback function */ | 431 | /* Receive callback function */ |
diff --git a/drivers/net/irda/ksdazzle-sir.c b/drivers/net/irda/ksdazzle-sir.c index 64df27f2bfd4..1ef45ec74422 100644 --- a/drivers/net/irda/ksdazzle-sir.c +++ b/drivers/net/irda/ksdazzle-sir.c | |||
@@ -304,9 +304,6 @@ static int ksdazzle_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
304 | unsigned int wraplen; | 304 | unsigned int wraplen; |
305 | int ret = 0; | 305 | int ret = 0; |
306 | 306 | ||
307 | if (skb == NULL || netdev == NULL) | ||
308 | return -EINVAL; | ||
309 | |||
310 | netif_stop_queue(netdev); | 307 | netif_stop_queue(netdev); |
311 | 308 | ||
312 | /* the IRDA wrapping routines don't deal with non linear skb */ | 309 | /* the IRDA wrapping routines don't deal with non linear skb */ |
@@ -341,7 +338,7 @@ static int ksdazzle_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
341 | dev_kfree_skb(skb); | 338 | dev_kfree_skb(skb); |
342 | spin_unlock(&kingsun->lock); | 339 | spin_unlock(&kingsun->lock); |
343 | 340 | ||
344 | return ret; | 341 | return NETDEV_TX_OK; |
345 | } | 342 | } |
346 | 343 | ||
347 | /* Receive callback function */ | 344 | /* Receive callback function */ |
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index fac504d0cfd8..f4df1001983c 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c | |||
@@ -824,10 +824,6 @@ static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
824 | int wraplen; | 824 | int wraplen; |
825 | int ret = 0; | 825 | int ret = 0; |
826 | 826 | ||
827 | |||
828 | if (skb == NULL || ndev == NULL) | ||
829 | return -EINVAL; | ||
830 | |||
831 | netif_stop_queue(ndev); | 827 | netif_stop_queue(ndev); |
832 | mcs = netdev_priv(ndev); | 828 | mcs = netdev_priv(ndev); |
833 | 829 | ||
@@ -870,7 +866,7 @@ static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
870 | 866 | ||
871 | dev_kfree_skb(skb); | 867 | dev_kfree_skb(skb); |
872 | spin_unlock_irqrestore(&mcs->lock, flags); | 868 | spin_unlock_irqrestore(&mcs->lock, flags); |
873 | return ret; | 869 | return NETDEV_TX_OK; |
874 | } | 870 | } |
875 | 871 | ||
876 | static const struct net_device_ops mcs_netdev_ops = { | 872 | static const struct net_device_ops mcs_netdev_ops = { |
diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c index d940809762ec..fd0796c3db3c 100644 --- a/drivers/net/irda/sir_dev.c +++ b/drivers/net/irda/sir_dev.c | |||
@@ -607,7 +607,7 @@ static int sirdev_hard_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
607 | * stopped so the network layer will retry after the | 607 | * stopped so the network layer will retry after the |
608 | * fsm completes and wakes the queue. | 608 | * fsm completes and wakes the queue. |
609 | */ | 609 | */ |
610 | return 1; | 610 | return NETDEV_TX_BUSY; |
611 | } | 611 | } |
612 | else if (unlikely(err)) { | 612 | else if (unlikely(err)) { |
613 | /* other fatal error - forget the speed change and | 613 | /* other fatal error - forget the speed change and |
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c index 789b6cb744b2..f28c23343009 100644 --- a/drivers/net/lib8390.c +++ b/drivers/net/lib8390.c | |||
@@ -370,7 +370,7 @@ static int __ei_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
370 | spin_unlock(&ei_local->page_lock); | 370 | spin_unlock(&ei_local->page_lock); |
371 | enable_irq_lockdep_irqrestore(dev->irq, &flags); | 371 | enable_irq_lockdep_irqrestore(dev->irq, &flags); |
372 | dev->stats.tx_errors++; | 372 | dev->stats.tx_errors++; |
373 | return 1; | 373 | return NETDEV_TX_BUSY; |
374 | } | 374 | } |
375 | 375 | ||
376 | /* | 376 | /* |
diff --git a/drivers/net/mac89x0.c b/drivers/net/mac89x0.c index e24175a39460..dab45339d3a8 100644 --- a/drivers/net/mac89x0.c +++ b/drivers/net/mac89x0.c | |||
@@ -400,7 +400,7 @@ net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
400 | /* Gasp! It hasn't. But that shouldn't happen since | 400 | /* Gasp! It hasn't. But that shouldn't happen since |
401 | we're waiting for TxOk, so return 1 and requeue this packet. */ | 401 | we're waiting for TxOk, so return 1 and requeue this packet. */ |
402 | local_irq_restore(flags); | 402 | local_irq_restore(flags); |
403 | return 1; | 403 | return NETDEV_TX_BUSY; |
404 | } | 404 | } |
405 | 405 | ||
406 | /* Write the contents of the packet */ | 406 | /* Write the contents of the packet */ |
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 722265920da8..5b5c25368d1e 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
@@ -645,7 +645,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
645 | "BUG! Tx Ring full when queue awake!\n"); | 645 | "BUG! Tx Ring full when queue awake!\n"); |
646 | dev_dbg(&bp->pdev->dev, "tx_head = %u, tx_tail = %u\n", | 646 | dev_dbg(&bp->pdev->dev, "tx_head = %u, tx_tail = %u\n", |
647 | bp->tx_head, bp->tx_tail); | 647 | bp->tx_head, bp->tx_tail); |
648 | return 1; | 648 | return NETDEV_TX_BUSY; |
649 | } | 649 | } |
650 | 650 | ||
651 | entry = bp->tx_head; | 651 | entry = bp->tx_head; |
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index 1ad740bc8878..1427755c224d 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -547,7 +547,7 @@ static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev) | |||
547 | netif_stop_queue(dev); | 547 | netif_stop_queue(dev); |
548 | mp->tx_fullup = 1; | 548 | mp->tx_fullup = 1; |
549 | spin_unlock_irqrestore(&mp->lock, flags); | 549 | spin_unlock_irqrestore(&mp->lock, flags); |
550 | return 1; /* can't take it at the moment */ | 550 | return NETDEV_TX_BUSY; /* can't take it at the moment */ |
551 | } | 551 | } |
552 | spin_unlock_irqrestore(&mp->lock, flags); | 552 | spin_unlock_irqrestore(&mp->lock, flags); |
553 | 553 | ||
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index c9a30d3a66fb..1f6e36ea669e 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -2687,7 +2687,7 @@ again: | |||
2687 | /* we are out of transmit resources */ | 2687 | /* we are out of transmit resources */ |
2688 | tx->stop_queue++; | 2688 | tx->stop_queue++; |
2689 | netif_tx_stop_queue(netdev_queue); | 2689 | netif_tx_stop_queue(netdev_queue); |
2690 | return 1; | 2690 | return NETDEV_TX_BUSY; |
2691 | } | 2691 | } |
2692 | 2692 | ||
2693 | /* Setup checksum offloading, if needed */ | 2693 | /* Setup checksum offloading, if needed */ |
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 9a802adba9a3..5f0758bda6b3 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -640,7 +640,7 @@ static int myri_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
640 | 640 | ||
641 | if (!TX_BUFFS_AVAIL(head, tail)) { | 641 | if (!TX_BUFFS_AVAIL(head, tail)) { |
642 | DTX(("no buffs available, returning 1\n")); | 642 | DTX(("no buffs available, returning 1\n")); |
643 | return 1; | 643 | return NETDEV_TX_BUSY; |
644 | } | 644 | } |
645 | 645 | ||
646 | spin_lock_irqsave(&mp->irq_lock, flags); | 646 | spin_lock_irqsave(&mp->irq_lock, flags); |
diff --git a/drivers/net/ni65.c b/drivers/net/ni65.c index 6474f02bf783..1f10ed603e20 100644 --- a/drivers/net/ni65.c +++ b/drivers/net/ni65.c | |||
@@ -1165,7 +1165,7 @@ static int ni65_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1165 | 1165 | ||
1166 | if (test_and_set_bit(0, (void*)&p->lock)) { | 1166 | if (test_and_set_bit(0, (void*)&p->lock)) { |
1167 | printk(KERN_ERR "%s: Queue was locked.\n", dev->name); | 1167 | printk(KERN_ERR "%s: Queue was locked.\n", dev->name); |
1168 | return 1; | 1168 | return NETDEV_TX_BUSY; |
1169 | } | 1169 | } |
1170 | 1170 | ||
1171 | { | 1171 | { |
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index 940962ae8f23..1576ac07216e 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -1097,7 +1097,7 @@ again: | |||
1097 | if (unlikely(dev->CFG_cache & CFG_LNKSTS)) { | 1097 | if (unlikely(dev->CFG_cache & CFG_LNKSTS)) { |
1098 | netif_stop_queue(ndev); | 1098 | netif_stop_queue(ndev); |
1099 | if (unlikely(dev->CFG_cache & CFG_LNKSTS)) | 1099 | if (unlikely(dev->CFG_cache & CFG_LNKSTS)) |
1100 | return 1; | 1100 | return NETDEV_TX_BUSY; |
1101 | netif_start_queue(ndev); | 1101 | netif_start_queue(ndev); |
1102 | } | 1102 | } |
1103 | 1103 | ||
@@ -1115,7 +1115,7 @@ again: | |||
1115 | netif_start_queue(ndev); | 1115 | netif_start_queue(ndev); |
1116 | goto again; | 1116 | goto again; |
1117 | } | 1117 | } |
1118 | return 1; | 1118 | return NETDEV_TX_BUSY; |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | if (free_idx == dev->tx_intr_idx) { | 1121 | if (free_idx == dev->tx_intr_idx) { |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 15b8fe61695b..0e38d80fd255 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -1130,7 +1130,7 @@ static int axnet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1130 | outb_p(ENISR_ALL, e8390_base + EN0_IMR); | 1130 | outb_p(ENISR_ALL, e8390_base + EN0_IMR); |
1131 | spin_unlock_irqrestore(&ei_local->page_lock, flags); | 1131 | spin_unlock_irqrestore(&ei_local->page_lock, flags); |
1132 | dev->stats.tx_errors++; | 1132 | dev->stats.tx_errors++; |
1133 | return 1; | 1133 | return NETDEV_TX_BUSY; |
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | /* | 1136 | /* |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index 81e6660a433a..479d5b494371 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -877,7 +877,7 @@ static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
877 | if (length > ETH_FRAME_LEN) { | 877 | if (length > ETH_FRAME_LEN) { |
878 | printk(KERN_NOTICE "%s: Attempting to send a large packet" | 878 | printk(KERN_NOTICE "%s: Attempting to send a large packet" |
879 | " (%d bytes).\n", dev->name, length); | 879 | " (%d bytes).\n", dev->name, length); |
880 | return 1; | 880 | return NETDEV_TX_BUSY; |
881 | } | 881 | } |
882 | 882 | ||
883 | DEBUG(4, "%s: Transmitting a packet of length %lu.\n", | 883 | DEBUG(4, "%s: Transmitting a packet of length %lu.\n", |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 48dbb35747d8..37e05d3ab893 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -1388,7 +1388,7 @@ static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1388 | dev->stats.tx_aborted_errors++; | 1388 | dev->stats.tx_aborted_errors++; |
1389 | printk(KERN_DEBUG "%s: Internal error -- sent packet while busy.\n", | 1389 | printk(KERN_DEBUG "%s: Internal error -- sent packet while busy.\n", |
1390 | dev->name); | 1390 | dev->name); |
1391 | return 1; | 1391 | return NETDEV_TX_BUSY; |
1392 | } | 1392 | } |
1393 | smc->saved_skb = skb; | 1393 | smc->saved_skb = skb; |
1394 | 1394 | ||
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index a3685c0d22fc..ef37d22c7e1d 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -1399,7 +1399,7 @@ do_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1399 | DEBUG(2 + (okay ? 2 : 0), "%s: avail. tx space=%u%s\n", | 1399 | DEBUG(2 + (okay ? 2 : 0), "%s: avail. tx space=%u%s\n", |
1400 | dev->name, freespace, okay ? " (okay)":" (not enough)"); | 1400 | dev->name, freespace, okay ? " (okay)":" (not enough)"); |
1401 | if (!okay) { /* not enough space */ | 1401 | if (!okay) { /* not enough space */ |
1402 | return 1; /* upper layer may decide to requeue this packet */ | 1402 | return NETDEV_TX_BUSY; /* upper layer may decide to requeue this packet */ |
1403 | } | 1403 | } |
1404 | /* send the packet */ | 1404 | /* send the packet */ |
1405 | PutWord(XIRCREG_EDP, (u_short)pktlen); | 1405 | PutWord(XIRCREG_EDP, (u_short)pktlen); |
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 0be0f0b164f3..7a62f781fef2 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -955,12 +955,12 @@ plip_tx_packet(struct sk_buff *skb, struct net_device *dev) | |||
955 | struct plip_local *snd = &nl->snd_data; | 955 | struct plip_local *snd = &nl->snd_data; |
956 | 956 | ||
957 | if (netif_queue_stopped(dev)) | 957 | if (netif_queue_stopped(dev)) |
958 | return 1; | 958 | return NETDEV_TX_BUSY; |
959 | 959 | ||
960 | /* We may need to grab the bus */ | 960 | /* We may need to grab the bus */ |
961 | if (!nl->port_owner) { | 961 | if (!nl->port_owner) { |
962 | if (parport_claim(nl->pardev)) | 962 | if (parport_claim(nl->pardev)) |
963 | return 1; | 963 | return NETDEV_TX_BUSY; |
964 | nl->port_owner = 1; | 964 | nl->port_owner = 1; |
965 | } | 965 | } |
966 | 966 | ||
@@ -969,7 +969,7 @@ plip_tx_packet(struct sk_buff *skb, struct net_device *dev) | |||
969 | if (skb->len > dev->mtu + dev->hard_header_len) { | 969 | if (skb->len > dev->mtu + dev->hard_header_len) { |
970 | printk(KERN_WARNING "%s: packet too big, %d.\n", dev->name, (int)skb->len); | 970 | printk(KERN_WARNING "%s: packet too big, %d.\n", dev->name, (int)skb->len); |
971 | netif_start_queue (dev); | 971 | netif_start_queue (dev); |
972 | return 1; | 972 | return NETDEV_TX_BUSY; |
973 | } | 973 | } |
974 | 974 | ||
975 | if (net_debug > 2) | 975 | if (net_debug > 2) |
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c index d890829a9acc..81dbcbb910f4 100644 --- a/drivers/net/rrunner.c +++ b/drivers/net/rrunner.c | |||
@@ -1425,7 +1425,7 @@ static int rr_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1425 | if (!(new_skb = dev_alloc_skb(len + 8))) { | 1425 | if (!(new_skb = dev_alloc_skb(len + 8))) { |
1426 | dev_kfree_skb(skb); | 1426 | dev_kfree_skb(skb); |
1427 | netif_wake_queue(dev); | 1427 | netif_wake_queue(dev); |
1428 | return -EBUSY; | 1428 | return NETDEV_TX_OK; |
1429 | } | 1429 | } |
1430 | skb_reserve(new_skb, 8); | 1430 | skb_reserve(new_skb, 8); |
1431 | skb_put(new_skb, len); | 1431 | skb_put(new_skb, len); |
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index 7a4b9fbddbaf..d8c9cf1b901d 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -2084,7 +2084,7 @@ static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev) | |||
2084 | netif_stop_queue(dev); | 2084 | netif_stop_queue(dev); |
2085 | spin_unlock_irqrestore(&sc->sbm_lock, flags); | 2085 | spin_unlock_irqrestore(&sc->sbm_lock, flags); |
2086 | 2086 | ||
2087 | return 1; | 2087 | return NETDEV_TX_BUSY; |
2088 | } | 2088 | } |
2089 | 2089 | ||
2090 | dev->trans_start = jiffies; | 2090 | dev->trans_start = jiffies; |
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 0709b7512467..341882f959f3 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -1108,7 +1108,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
1108 | if (!sh_eth_txfree(ndev)) { | 1108 | if (!sh_eth_txfree(ndev)) { |
1109 | netif_stop_queue(ndev); | 1109 | netif_stop_queue(ndev); |
1110 | spin_unlock_irqrestore(&mdp->lock, flags); | 1110 | spin_unlock_irqrestore(&mdp->lock, flags); |
1111 | return 1; | 1111 | return NETDEV_TX_BUSY; |
1112 | } | 1112 | } |
1113 | } | 1113 | } |
1114 | spin_unlock_irqrestore(&mdp->lock, flags); | 1114 | spin_unlock_irqrestore(&mdp->lock, flags); |
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index 2d4617b3e208..a9a897bb42d5 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c | |||
@@ -1584,7 +1584,7 @@ sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev) | |||
1584 | /* Don't transmit data before the complete of auto-negotiation */ | 1584 | /* Don't transmit data before the complete of auto-negotiation */ |
1585 | if(!sis_priv->autong_complete){ | 1585 | if(!sis_priv->autong_complete){ |
1586 | netif_stop_queue(net_dev); | 1586 | netif_stop_queue(net_dev); |
1587 | return 1; | 1587 | return NETDEV_TX_BUSY; |
1588 | } | 1588 | } |
1589 | 1589 | ||
1590 | spin_lock_irqsave(&sis_priv->lock, flags); | 1590 | spin_lock_irqsave(&sis_priv->lock, flags); |
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 19d343c42a21..088fe26484e7 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -1082,7 +1082,7 @@ static int skfp_send_pkt(struct sk_buff *skb, struct net_device *dev) | |||
1082 | if (bp->QueueSkb == 0) { // return with tbusy set: queue full | 1082 | if (bp->QueueSkb == 0) { // return with tbusy set: queue full |
1083 | 1083 | ||
1084 | netif_stop_queue(dev); | 1084 | netif_stop_queue(dev); |
1085 | return 1; | 1085 | return NETDEV_TX_BUSY; |
1086 | } | 1086 | } |
1087 | bp->QueueSkb--; | 1087 | bp->QueueSkb--; |
1088 | skb_queue_tail(&bp->SendSkbQueue, skb); | 1088 | skb_queue_tail(&bp->SendSkbQueue, skb); |
diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c index 9a7973a54116..e02471b2f2b5 100644 --- a/drivers/net/smc9194.c +++ b/drivers/net/smc9194.c | |||
@@ -503,7 +503,7 @@ static int smc_wait_to_send_packet( struct sk_buff * skb, struct net_device * de | |||
503 | /* THIS SHOULD NEVER HAPPEN. */ | 503 | /* THIS SHOULD NEVER HAPPEN. */ |
504 | dev->stats.tx_aborted_errors++; | 504 | dev->stats.tx_aborted_errors++; |
505 | printk(CARDNAME": Bad Craziness - sent packet while busy.\n" ); | 505 | printk(CARDNAME": Bad Craziness - sent packet while busy.\n" ); |
506 | return 1; | 506 | return NETDEV_TX_BUSY; |
507 | } | 507 | } |
508 | lp->saved_skb = skb; | 508 | lp->saved_skb = skb; |
509 | 509 | ||
diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c index 211e805c1223..e4255d829380 100644 --- a/drivers/net/sonic.c +++ b/drivers/net/sonic.c | |||
@@ -223,7 +223,7 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
223 | if (!laddr) { | 223 | if (!laddr) { |
224 | printk(KERN_ERR "%s: failed to map tx DMA buffer.\n", dev->name); | 224 | printk(KERN_ERR "%s: failed to map tx DMA buffer.\n", dev->name); |
225 | dev_kfree_skb(skb); | 225 | dev_kfree_skb(skb); |
226 | return 1; | 226 | return NETDEV_TX_BUSY |
227 | } | 227 | } |
228 | 228 | ||
229 | sonic_tda_put(dev, entry, SONIC_TD_STATUS, 0); /* clear status */ | 229 | sonic_tda_put(dev, entry, SONIC_TD_STATUS, 0); /* clear status */ |
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index fcb943fca4f1..838cce8b8fff 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -1236,7 +1236,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev) | |||
1236 | */ | 1236 | */ |
1237 | if ((np->cur_tx - np->dirty_tx) + skb_num_frags(skb) * 2 > TX_RING_SIZE) { | 1237 | if ((np->cur_tx - np->dirty_tx) + skb_num_frags(skb) * 2 > TX_RING_SIZE) { |
1238 | netif_stop_queue(dev); | 1238 | netif_stop_queue(dev); |
1239 | return 1; | 1239 | return NETDEV_TX_BUSY; |
1240 | } | 1240 | } |
1241 | 1241 | ||
1242 | #if defined(ZEROCOPY) && defined(HAS_BROKEN_FIRMWARE) | 1242 | #if defined(ZEROCOPY) && defined(HAS_BROKEN_FIRMWARE) |
diff --git a/drivers/net/sun3_82586.c b/drivers/net/sun3_82586.c index a39c0b9ba8b6..7bb27426dbd6 100644 --- a/drivers/net/sun3_82586.c +++ b/drivers/net/sun3_82586.c | |||
@@ -1023,7 +1023,7 @@ static int sun3_82586_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1023 | #if(NUM_XMIT_BUFFS > 1) | 1023 | #if(NUM_XMIT_BUFFS > 1) |
1024 | if(test_and_set_bit(0,(void *) &p->lock)) { | 1024 | if(test_and_set_bit(0,(void *) &p->lock)) { |
1025 | printk("%s: Queue was locked\n",dev->name); | 1025 | printk("%s: Queue was locked\n",dev->name); |
1026 | return 1; | 1026 | return NETDEV_TX_BUSY; |
1027 | } | 1027 | } |
1028 | else | 1028 | else |
1029 | #endif | 1029 | #endif |
diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c index 9bd9dadb8534..534dfe3eef6f 100644 --- a/drivers/net/sun3lance.c +++ b/drivers/net/sun3lance.c | |||
@@ -526,7 +526,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) | |||
526 | if (netif_queue_stopped(dev)) { | 526 | if (netif_queue_stopped(dev)) { |
527 | int tickssofar = jiffies - dev->trans_start; | 527 | int tickssofar = jiffies - dev->trans_start; |
528 | if (tickssofar < 20) | 528 | if (tickssofar < 20) |
529 | return( 1 ); | 529 | return NETDEV_TX_BUSY; |
530 | 530 | ||
531 | DPRINTK( 1, ( "%s: transmit timed out, status %04x, resetting.\n", | 531 | DPRINTK( 1, ( "%s: transmit timed out, status %04x, resetting.\n", |
532 | dev->name, DREG )); | 532 | dev->name, DREG )); |
@@ -577,7 +577,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) | |||
577 | if (test_and_set_bit( 0, (void*)&lp->lock ) != 0) { | 577 | if (test_and_set_bit( 0, (void*)&lp->lock ) != 0) { |
578 | printk( "%s: tx queue lock!.\n", dev->name); | 578 | printk( "%s: tx queue lock!.\n", dev->name); |
579 | /* don't clear dev->tbusy flag. */ | 579 | /* don't clear dev->tbusy flag. */ |
580 | return 1; | 580 | return NETDEV_TX_BUSY; |
581 | } | 581 | } |
582 | 582 | ||
583 | AREG = CSR0; | 583 | AREG = CSR0; |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 4e9bd380a5c2..4ef729198e10 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2275,7 +2275,7 @@ static int happy_meal_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2275 | spin_unlock_irq(&hp->happy_lock); | 2275 | spin_unlock_irq(&hp->happy_lock); |
2276 | printk(KERN_ERR "%s: BUG! Tx Ring full when queue awake!\n", | 2276 | printk(KERN_ERR "%s: BUG! Tx Ring full when queue awake!\n", |
2277 | dev->name); | 2277 | dev->name); |
2278 | return 1; | 2278 | return NETDEV_TX_BUSY; |
2279 | } | 2279 | } |
2280 | 2280 | ||
2281 | entry = hp->tx_new; | 2281 | entry = hp->tx_new; |
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index aa6964922d5e..384cb5e28397 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -1111,7 +1111,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev ) | |||
1111 | dev->name, priv->txHead, priv->txTail ); | 1111 | dev->name, priv->txHead, priv->txTail ); |
1112 | netif_stop_queue(dev); | 1112 | netif_stop_queue(dev); |
1113 | priv->txBusyCount++; | 1113 | priv->txBusyCount++; |
1114 | return 1; | 1114 | return NETDEV_TX_BUSY; |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | tail_list->forward = 0; | 1117 | tail_list->forward = 0; |
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 534c0f38483c..13dbc59bfe42 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c | |||
@@ -1243,7 +1243,7 @@ static int xl_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1243 | return 0; | 1243 | return 0; |
1244 | } else { | 1244 | } else { |
1245 | spin_unlock_irqrestore(&xl_priv->xl_lock,flags) ; | 1245 | spin_unlock_irqrestore(&xl_priv->xl_lock,flags) ; |
1246 | return 1; | 1246 | return NETDEV_TX_BUSY; |
1247 | } | 1247 | } |
1248 | 1248 | ||
1249 | } | 1249 | } |
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index 2e70ee8f1459..b358bbbce33a 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c | |||
@@ -1187,7 +1187,7 @@ static int streamer_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1187 | } else { | 1187 | } else { |
1188 | netif_stop_queue(dev); | 1188 | netif_stop_queue(dev); |
1189 | spin_unlock_irqrestore(&streamer_priv->streamer_lock,flags); | 1189 | spin_unlock_irqrestore(&streamer_priv->streamer_lock,flags); |
1190 | return 1; | 1190 | return NETDEV_TX_BUSY; |
1191 | } | 1191 | } |
1192 | } | 1192 | } |
1193 | 1193 | ||
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c index d068a9d36883..c36974925c15 100644 --- a/drivers/net/tokenring/olympic.c +++ b/drivers/net/tokenring/olympic.c | |||
@@ -1055,7 +1055,7 @@ static int olympic_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1055 | return 0; | 1055 | return 0; |
1056 | } else { | 1056 | } else { |
1057 | spin_unlock_irqrestore(&olympic_priv->olympic_lock,flags); | 1057 | spin_unlock_irqrestore(&olympic_priv->olympic_lock,flags); |
1058 | return 1; | 1058 | return NETDEV_TX_BUSY; |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | } | 1061 | } |
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index a91d9c55d78e..54ad4ed03374 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c | |||
@@ -4601,7 +4601,7 @@ static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
4601 | netif_stop_queue(dev); | 4601 | netif_stop_queue(dev); |
4602 | 4602 | ||
4603 | if(tp->QueueSkb == 0) | 4603 | if(tp->QueueSkb == 0) |
4604 | return (1); /* Return with tbusy set: queue full */ | 4604 | return NETDEV_TX_BUSY; /* Return with tbusy set: queue full */ |
4605 | 4605 | ||
4606 | tp->QueueSkb--; | 4606 | tp->QueueSkb--; |
4607 | skb_queue_tail(&tp->SendSkbQueue, skb); | 4607 | skb_queue_tail(&tp->SendSkbQueue, skb); |
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index b11bb72dc7ab..a2eab72b507a 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c | |||
@@ -633,7 +633,7 @@ static int tms380tr_hardware_send_packet(struct sk_buff *skb, struct net_device | |||
633 | if (tms380tr_debug > 0) | 633 | if (tms380tr_debug > 0) |
634 | printk(KERN_DEBUG "%s: No free TPL\n", dev->name); | 634 | printk(KERN_DEBUG "%s: No free TPL\n", dev->name); |
635 | spin_unlock_irqrestore(&tp->lock, flags); | 635 | spin_unlock_irqrestore(&tp->lock, flags); |
636 | return 1; | 636 | return NETDEV_TX_BUSY; |
637 | } | 637 | } |
638 | 638 | ||
639 | dmabuf = 0; | 639 | dmabuf = 0; |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index e7609a05032d..81f054dbb88d 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -612,7 +612,7 @@ static int de_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
612 | if (tx_free == 0) { | 612 | if (tx_free == 0) { |
613 | netif_stop_queue(dev); | 613 | netif_stop_queue(dev); |
614 | spin_unlock_irq(&de->lock); | 614 | spin_unlock_irq(&de->lock); |
615 | return 1; | 615 | return NETDEV_TX_BUSY; |
616 | } | 616 | } |
617 | tx_free--; | 617 | tx_free--; |
618 | 618 | ||
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 32256179a205..eb72d2e9ab3d 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
@@ -1461,12 +1461,12 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) | |||
1461 | { | 1461 | { |
1462 | struct de4x5_private *lp = netdev_priv(dev); | 1462 | struct de4x5_private *lp = netdev_priv(dev); |
1463 | u_long iobase = dev->base_addr; | 1463 | u_long iobase = dev->base_addr; |
1464 | int status = 0; | 1464 | int status = NETDEV_TX_OK; |
1465 | u_long flags = 0; | 1465 | u_long flags = 0; |
1466 | 1466 | ||
1467 | netif_stop_queue(dev); | 1467 | netif_stop_queue(dev); |
1468 | if (!lp->tx_enable) { /* Cannot send for now */ | 1468 | if (!lp->tx_enable) { /* Cannot send for now */ |
1469 | return -1; | 1469 | return NETDEV_TX_LOCKED; |
1470 | } | 1470 | } |
1471 | 1471 | ||
1472 | /* | 1472 | /* |
@@ -1480,7 +1480,7 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) | |||
1480 | 1480 | ||
1481 | /* Test if cache is already locked - requeue skb if so */ | 1481 | /* Test if cache is already locked - requeue skb if so */ |
1482 | if (test_and_set_bit(0, (void *)&lp->cache.lock) && !lp->interrupt) | 1482 | if (test_and_set_bit(0, (void *)&lp->cache.lock) && !lp->interrupt) |
1483 | return -1; | 1483 | return NETDEV_TX_LOCKED; |
1484 | 1484 | ||
1485 | /* Transmit descriptor ring full or stale skb */ | 1485 | /* Transmit descriptor ring full or stale skb */ |
1486 | if (netif_queue_stopped(dev) || (u_long) lp->tx_skb[lp->tx_new] > 1) { | 1486 | if (netif_queue_stopped(dev) || (u_long) lp->tx_skb[lp->tx_new] > 1) { |
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index f2e669974c78..8e78f003f08f 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c | |||
@@ -686,7 +686,7 @@ static int dmfe_start_xmit(struct sk_buff *skb, struct DEVICE *dev) | |||
686 | spin_unlock_irqrestore(&db->lock, flags); | 686 | spin_unlock_irqrestore(&db->lock, flags); |
687 | printk(KERN_ERR DRV_NAME ": No Tx resource %ld\n", | 687 | printk(KERN_ERR DRV_NAME ": No Tx resource %ld\n", |
688 | db->tx_queue_cnt); | 688 | db->tx_queue_cnt); |
689 | return 1; | 689 | return NETDEV_TX_BUSY; |
690 | } | 690 | } |
691 | 691 | ||
692 | /* Disable NIC interrupt */ | 692 | /* Disable NIC interrupt */ |
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index 8761a5a5bd79..9277ce8febe4 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c | |||
@@ -591,7 +591,7 @@ static int uli526x_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
591 | if (db->tx_packet_cnt >= TX_FREE_DESC_CNT) { | 591 | if (db->tx_packet_cnt >= TX_FREE_DESC_CNT) { |
592 | spin_unlock_irqrestore(&db->lock, flags); | 592 | spin_unlock_irqrestore(&db->lock, flags); |
593 | printk(KERN_ERR DRV_NAME ": No Tx resource %ld\n", db->tx_packet_cnt); | 593 | printk(KERN_ERR DRV_NAME ": No Tx resource %ld\n", db->tx_packet_cnt); |
594 | return 1; | 594 | return NETDEV_TX_BUSY; |
595 | } | 595 | } |
596 | 596 | ||
597 | /* Disable NIC interrupt */ | 597 | /* Disable NIC interrupt */ |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index e3580f42c899..f8c6d7ea7264 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -816,7 +816,7 @@ static int hso_net_start_xmit(struct sk_buff *skb, struct net_device *net) | |||
816 | } | 816 | } |
817 | dev_kfree_skb(skb); | 817 | dev_kfree_skb(skb); |
818 | /* we're done */ | 818 | /* we're done */ |
819 | return result; | 819 | return NETDEV_TX_OK; |
820 | } | 820 | } |
821 | 821 | ||
822 | static void hso_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info) | 822 | static void hso_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info) |
diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c index 35dea3bea95d..f525f9fe74db 100644 --- a/drivers/net/wan/cycx_x25.c +++ b/drivers/net/wan/cycx_x25.c | |||
@@ -615,7 +615,7 @@ static int cycx_netdevice_hard_start_xmit(struct sk_buff *skb, | |||
615 | case WAN_DISCONNECTED: | 615 | case WAN_DISCONNECTED: |
616 | if (cycx_x25_chan_connect(dev)) { | 616 | if (cycx_x25_chan_connect(dev)) { |
617 | netif_stop_queue(dev); | 617 | netif_stop_queue(dev); |
618 | return -EBUSY; | 618 | return NETDEV_TX_BUSY; |
619 | } | 619 | } |
620 | /* fall thru */ | 620 | /* fall thru */ |
621 | case WAN_CONNECTED: | 621 | case WAN_CONNECTED: |
@@ -624,7 +624,7 @@ static int cycx_netdevice_hard_start_xmit(struct sk_buff *skb, | |||
624 | netif_stop_queue(dev); | 624 | netif_stop_queue(dev); |
625 | 625 | ||
626 | if (cycx_x25_chan_send(dev, skb)) | 626 | if (cycx_x25_chan_send(dev, skb)) |
627 | return -EBUSY; | 627 | return NETDEV_TX_BUSY; |
628 | 628 | ||
629 | break; | 629 | break; |
630 | default: | 630 | default: |
@@ -656,7 +656,7 @@ static int cycx_netdevice_hard_start_xmit(struct sk_buff *skb, | |||
656 | if (cycx_x25_chan_send(dev, skb)) { | 656 | if (cycx_x25_chan_send(dev, skb)) { |
657 | /* prepare for future retransmissions */ | 657 | /* prepare for future retransmissions */ |
658 | skb_push(skb, 1); | 658 | skb_push(skb, 1); |
659 | return -EBUSY; | 659 | return NETDEV_TX_BUSY; |
660 | } | 660 | } |
661 | } | 661 | } |
662 | 662 | ||
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index e8d155c3e59f..2fa275a58f9d 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c | |||
@@ -205,15 +205,15 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev) | |||
205 | { | 205 | { |
206 | case DLCI_RET_OK: | 206 | case DLCI_RET_OK: |
207 | dev->stats.tx_packets++; | 207 | dev->stats.tx_packets++; |
208 | ret = 0; | 208 | ret = NETDEV_TX_OK; |
209 | break; | 209 | break; |
210 | case DLCI_RET_ERR: | 210 | case DLCI_RET_ERR: |
211 | dev->stats.tx_errors++; | 211 | dev->stats.tx_errors++; |
212 | ret = 0; | 212 | ret = NETDEV_TX_OK; |
213 | break; | 213 | break; |
214 | case DLCI_RET_DROP: | 214 | case DLCI_RET_DROP: |
215 | dev->stats.tx_dropped++; | 215 | dev->stats.tx_dropped++; |
216 | ret = 1; | 216 | ret = NETDEV_TX_BUSY; |
217 | break; | 217 | break; |
218 | } | 218 | } |
219 | /* Alan Cox recommends always returning 0, and always freeing the packet */ | 219 | /* Alan Cox recommends always returning 0, and always freeing the packet */ |
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index f4211fe0f445..3fb9dbc88a1a 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c | |||
@@ -469,7 +469,7 @@ sbni_start_xmit( struct sk_buff *skb, struct net_device *dev ) | |||
469 | } | 469 | } |
470 | } | 470 | } |
471 | 471 | ||
472 | return 1; | 472 | return NETDEV_TX_BUSY; |
473 | } | 473 | } |
474 | 474 | ||
475 | #else /* CONFIG_SBNI_MULTILINE */ | 475 | #else /* CONFIG_SBNI_MULTILINE */ |
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 8130b79a8a99..e4ad7b6b52eb 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c | |||
@@ -283,7 +283,7 @@ static int wanxl_xmit(struct sk_buff *skb, struct net_device *dev) | |||
283 | #endif | 283 | #endif |
284 | netif_stop_queue(dev); | 284 | netif_stop_queue(dev); |
285 | spin_unlock_irq(&port->lock); | 285 | spin_unlock_irq(&port->lock); |
286 | return 1; /* request packet to be queued */ | 286 | return NETDEV_TX_BUSY; /* request packet to be queued */ |
287 | } | 287 | } |
288 | 288 | ||
289 | #ifdef DEBUG_PKT | 289 | #ifdef DEBUG_PKT |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 9eabf4d1f2e7..c70604f0329e 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -1935,7 +1935,7 @@ static int mpi_start_xmit(struct sk_buff *skb, struct net_device *dev) { | |||
1935 | netif_stop_queue (dev); | 1935 | netif_stop_queue (dev); |
1936 | if (npacks > MAXTXQ) { | 1936 | if (npacks > MAXTXQ) { |
1937 | dev->stats.tx_fifo_errors++; | 1937 | dev->stats.tx_fifo_errors++; |
1938 | return 1; | 1938 | return NETDEV_TX_BUSY; |
1939 | } | 1939 | } |
1940 | skb_queue_tail (&ai->txq, skb); | 1940 | skb_queue_tail (&ai->txq, skb); |
1941 | return 0; | 1941 | return 0; |
@@ -2139,7 +2139,7 @@ static int airo_start_xmit(struct sk_buff *skb, struct net_device *dev) { | |||
2139 | 2139 | ||
2140 | if (i == MAX_FIDS / 2) { | 2140 | if (i == MAX_FIDS / 2) { |
2141 | dev->stats.tx_fifo_errors++; | 2141 | dev->stats.tx_fifo_errors++; |
2142 | return 1; | 2142 | return NETDEV_TX_BUSY; |
2143 | } | 2143 | } |
2144 | } | 2144 | } |
2145 | /* check min length*/ | 2145 | /* check min length*/ |
@@ -2193,7 +2193,8 @@ static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) { | |||
2193 | if (test_bit(FLAG_MPI, &priv->flags)) { | 2193 | if (test_bit(FLAG_MPI, &priv->flags)) { |
2194 | /* Not implemented yet for MPI350 */ | 2194 | /* Not implemented yet for MPI350 */ |
2195 | netif_stop_queue(dev); | 2195 | netif_stop_queue(dev); |
2196 | return -ENETDOWN; | 2196 | dev_kfree_skb_any(skb); |
2197 | return NETDEV_TX_OK; | ||
2197 | } | 2198 | } |
2198 | 2199 | ||
2199 | if ( skb == NULL ) { | 2200 | if ( skb == NULL ) { |
@@ -2210,7 +2211,7 @@ static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) { | |||
2210 | 2211 | ||
2211 | if (i == MAX_FIDS) { | 2212 | if (i == MAX_FIDS) { |
2212 | dev->stats.tx_fifo_errors++; | 2213 | dev->stats.tx_fifo_errors++; |
2213 | return 1; | 2214 | return NETDEV_TX_BUSY; |
2214 | } | 2215 | } |
2215 | } | 2216 | } |
2216 | /* check min length*/ | 2217 | /* check min length*/ |
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c index a54a67c425c8..d84caf198a23 100644 --- a/drivers/net/wireless/arlan-main.c +++ b/drivers/net/wireless/arlan-main.c | |||
@@ -1199,7 +1199,7 @@ bad_end: | |||
1199 | arlan_process_interrupt(dev); | 1199 | arlan_process_interrupt(dev); |
1200 | netif_stop_queue (dev); | 1200 | netif_stop_queue (dev); |
1201 | ARLAN_DEBUG_EXIT("arlan_tx"); | 1201 | ARLAN_DEBUG_EXIT("arlan_tx"); |
1202 | return 1; | 1202 | return NETDEV_TX_BUSY; |
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | 1205 | ||
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 27eef8fb7107..291a94bd46fd 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -818,7 +818,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev) | |||
818 | spin_unlock_irqrestore(&priv->irqlock, flags); | 818 | spin_unlock_irqrestore(&priv->irqlock, flags); |
819 | spin_unlock_bh(&priv->timerlock); | 819 | spin_unlock_bh(&priv->timerlock); |
820 | netif_stop_queue(dev); | 820 | netif_stop_queue(dev); |
821 | return 1; | 821 | return NETDEV_TX_BUSY; |
822 | } | 822 | } |
823 | 823 | ||
824 | frame_ctl = IEEE80211_FTYPE_DATA; | 824 | frame_ctl = IEEE80211_FTYPE_DATA; |
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index 6693423f63fe..d313b005114e 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c | |||
@@ -377,7 +377,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
377 | { | 377 | { |
378 | struct hostap_interface *iface; | 378 | struct hostap_interface *iface; |
379 | local_info_t *local; | 379 | local_info_t *local; |
380 | int ret = 1; | 380 | int ret = NETDEV_TX_BUSY; |
381 | u16 fc; | 381 | u16 fc; |
382 | struct hostap_tx_data tx; | 382 | struct hostap_tx_data tx; |
383 | ap_tx_ret tx_ret; | 383 | ap_tx_ret tx_ret; |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index c3b3dfe43d1a..44c29b3f6728 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -11524,7 +11524,8 @@ static int ipw_prom_stop(struct net_device *dev) | |||
11524 | static int ipw_prom_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | 11524 | static int ipw_prom_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) |
11525 | { | 11525 | { |
11526 | IPW_DEBUG_INFO("prom dev->xmit\n"); | 11526 | IPW_DEBUG_INFO("prom dev->xmit\n"); |
11527 | return -EOPNOTSUPP; | 11527 | dev_kfree_skb(skb); |
11528 | return NETDEV_TX_OK; | ||
11528 | } | 11529 | } |
11529 | 11530 | ||
11530 | static const struct net_device_ops ipw_prom_netdev_ops = { | 11531 | static const struct net_device_ops ipw_prom_netdev_ops = { |
diff --git a/drivers/net/wireless/ipw2x00/libipw_tx.c b/drivers/net/wireless/ipw2x00/libipw_tx.c index 65a8195b3d90..da2ad5437ce5 100644 --- a/drivers/net/wireless/ipw2x00/libipw_tx.c +++ b/drivers/net/wireless/ipw2x00/libipw_tx.c | |||
@@ -539,7 +539,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) | |||
539 | spin_unlock_irqrestore(&ieee->lock, flags); | 539 | spin_unlock_irqrestore(&ieee->lock, flags); |
540 | netif_stop_queue(dev); | 540 | netif_stop_queue(dev); |
541 | dev->stats.tx_errors++; | 541 | dev->stats.tx_errors++; |
542 | return 1; | 542 | return NETDEV_TX_BUSY; |
543 | } | 543 | } |
544 | EXPORT_SYMBOL(ieee80211_xmit); | 544 | EXPORT_SYMBOL(ieee80211_xmit); |
545 | 545 | ||
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index ef3ef4551b31..8f6210993448 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c | |||
@@ -87,7 +87,6 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) | |||
87 | unsigned long flags; | 87 | unsigned long flags; |
88 | unsigned char wds_mac[6]; | 88 | unsigned char wds_mac[6]; |
89 | u32 curr_frag; | 89 | u32 curr_frag; |
90 | int err = 0; | ||
91 | 90 | ||
92 | #if VERBOSE > SHOW_ERROR_MESSAGES | 91 | #if VERBOSE > SHOW_ERROR_MESSAGES |
93 | DEBUG(SHOW_FUNCTION_CALLS, "islpci_eth_transmit \n"); | 92 | DEBUG(SHOW_FUNCTION_CALLS, "islpci_eth_transmit \n"); |
@@ -107,8 +106,6 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) | |||
107 | isl38xx_w32_flush(priv->device_base, ISL38XX_DEV_INT_UPDATE, | 106 | isl38xx_w32_flush(priv->device_base, ISL38XX_DEV_INT_UPDATE, |
108 | ISL38XX_DEV_INT_REG); | 107 | ISL38XX_DEV_INT_REG); |
109 | udelay(ISL38XX_WRITEIO_DELAY); | 108 | udelay(ISL38XX_WRITEIO_DELAY); |
110 | |||
111 | err = -EBUSY; | ||
112 | goto drop_free; | 109 | goto drop_free; |
113 | } | 110 | } |
114 | /* Check alignment and WDS frame formatting. The start of the packet should | 111 | /* Check alignment and WDS frame formatting. The start of the packet should |
@@ -152,7 +149,6 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) | |||
152 | if (unlikely(newskb == NULL)) { | 149 | if (unlikely(newskb == NULL)) { |
153 | printk(KERN_ERR "%s: Cannot allocate skb\n", | 150 | printk(KERN_ERR "%s: Cannot allocate skb\n", |
154 | ndev->name); | 151 | ndev->name); |
155 | err = -ENOMEM; | ||
156 | goto drop_free; | 152 | goto drop_free; |
157 | } | 153 | } |
158 | newskb_offset = (4 - (long) newskb->data) & 0x03; | 154 | newskb_offset = (4 - (long) newskb->data) & 0x03; |
@@ -197,8 +193,6 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) | |||
197 | if (unlikely(pci_map_address == 0)) { | 193 | if (unlikely(pci_map_address == 0)) { |
198 | printk(KERN_WARNING "%s: cannot map buffer to PCI\n", | 194 | printk(KERN_WARNING "%s: cannot map buffer to PCI\n", |
199 | ndev->name); | 195 | ndev->name); |
200 | |||
201 | err = -EIO; | ||
202 | goto drop_free; | 196 | goto drop_free; |
203 | } | 197 | } |
204 | /* Place the fragment in the control block structure. */ | 198 | /* Place the fragment in the control block structure. */ |
@@ -246,7 +240,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) | |||
246 | ndev->stats.tx_dropped++; | 240 | ndev->stats.tx_dropped++; |
247 | spin_unlock_irqrestore(&priv->slock, flags); | 241 | spin_unlock_irqrestore(&priv->slock, flags); |
248 | dev_kfree_skb(skb); | 242 | dev_kfree_skb(skb); |
249 | return err; | 243 | return NETDEV_TX_OK; |
250 | } | 244 | } |
251 | 245 | ||
252 | static inline int | 246 | static inline int |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 22e71856aa24..b10b0383dfa5 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -923,7 +923,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
923 | 923 | ||
924 | if (!(pcmcia_dev_present(link))) { | 924 | if (!(pcmcia_dev_present(link))) { |
925 | DEBUG(2, "ray_dev_start_xmit - device not present\n"); | 925 | DEBUG(2, "ray_dev_start_xmit - device not present\n"); |
926 | return -1; | 926 | return NETDEV_TX_LOCKED; |
927 | } | 927 | } |
928 | DEBUG(3, "ray_dev_start_xmit(skb=%p, dev=%p)\n", skb, dev); | 928 | DEBUG(3, "ray_dev_start_xmit(skb=%p, dev=%p)\n", skb, dev); |
929 | if (local->authentication_state == NEED_TO_AUTH) { | 929 | if (local->authentication_state == NEED_TO_AUTH) { |
@@ -931,7 +931,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
931 | if (!build_auth_frame(local, local->auth_id, OPEN_AUTH_REQUEST)) { | 931 | if (!build_auth_frame(local, local->auth_id, OPEN_AUTH_REQUEST)) { |
932 | local->authentication_state = AUTHENTICATED; | 932 | local->authentication_state = AUTHENTICATED; |
933 | netif_stop_queue(dev); | 933 | netif_stop_queue(dev); |
934 | return 1; | 934 | return NETDEV_TX_BUSY; |
935 | } | 935 | } |
936 | } | 936 | } |
937 | 937 | ||
@@ -944,7 +944,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
944 | case XMIT_NO_CCS: | 944 | case XMIT_NO_CCS: |
945 | case XMIT_NEED_AUTH: | 945 | case XMIT_NEED_AUTH: |
946 | netif_stop_queue(dev); | 946 | netif_stop_queue(dev); |
947 | return 1; | 947 | return NETDEV_TX_BUSY; |
948 | case XMIT_NO_INTR: | 948 | case XMIT_NO_INTR: |
949 | case XMIT_MSG_BAD: | 949 | case XMIT_MSG_BAD: |
950 | case XMIT_OK: | 950 | case XMIT_OK: |
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index b7b0c46adb46..38366a56b71f 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c | |||
@@ -1540,7 +1540,7 @@ static int strip_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1540 | if (!netif_running(dev)) { | 1540 | if (!netif_running(dev)) { |
1541 | printk(KERN_ERR "%s: xmit call when iface is down\n", | 1541 | printk(KERN_ERR "%s: xmit call when iface is down\n", |
1542 | dev->name); | 1542 | dev->name); |
1543 | return (1); | 1543 | return NETDEV_TX_BUSY; |
1544 | } | 1544 | } |
1545 | 1545 | ||
1546 | netif_stop_queue(dev); | 1546 | netif_stop_queue(dev); |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index 25d27b64f528..ab7fc5c0c8b4 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -2867,7 +2867,7 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) | |||
2867 | spin_unlock_irqrestore(&lp->spinlock, flags); | 2867 | spin_unlock_irqrestore(&lp->spinlock, flags); |
2868 | /* Check that we can continue */ | 2868 | /* Check that we can continue */ |
2869 | if (lp->tx_n_in_use == (NTXBLOCKS - 1)) | 2869 | if (lp->tx_n_in_use == (NTXBLOCKS - 1)) |
2870 | return 1; | 2870 | return NETDEV_TX_BUSY; |
2871 | } | 2871 | } |
2872 | 2872 | ||
2873 | /* Do we need some padding? */ | 2873 | /* Do we need some padding? */ |
@@ -2880,10 +2880,10 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) | |||
2880 | skb_copy_from_linear_data(skb, data, skb->len); | 2880 | skb_copy_from_linear_data(skb, data, skb->len); |
2881 | /* Write packet on the card */ | 2881 | /* Write packet on the card */ |
2882 | if(wv_packet_write(dev, data, ETH_ZLEN)) | 2882 | if(wv_packet_write(dev, data, ETH_ZLEN)) |
2883 | return 1; /* We failed */ | 2883 | return NETDEV_TX_BUSY; /* We failed */ |
2884 | } | 2884 | } |
2885 | else if(wv_packet_write(dev, skb->data, skb->len)) | 2885 | else if(wv_packet_write(dev, skb->data, skb->len)) |
2886 | return 1; /* We failed */ | 2886 | return NETDEV_TX_BUSY; /* We failed */ |
2887 | 2887 | ||
2888 | 2888 | ||
2889 | dev_kfree_skb(skb); | 2889 | dev_kfree_skb(skb); |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 1f64d6033ab5..e3e96bb2c246 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -1348,6 +1348,7 @@ static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1348 | if (rc) { | 1348 | if (rc) { |
1349 | ++dev->stats.tx_dropped; | 1349 | ++dev->stats.tx_dropped; |
1350 | netif_stop_queue(dev); | 1350 | netif_stop_queue(dev); |
1351 | rc = NETDEV_TX_OK; | ||
1351 | } else { | 1352 | } else { |
1352 | ++dev->stats.tx_packets; | 1353 | ++dev->stats.tx_packets; |
1353 | dev->stats.tx_bytes += skb->len; | 1354 | dev->stats.tx_bytes += skb->len; |
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 5fabd9c0f07a..4430b8d92e21 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
@@ -819,11 +819,11 @@ static int zd1201_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
819 | if (err) { | 819 | if (err) { |
820 | dev->stats.tx_errors++; | 820 | dev->stats.tx_errors++; |
821 | netif_start_queue(dev); | 821 | netif_start_queue(dev); |
822 | return err; | 822 | } else { |
823 | dev->stats.tx_packets++; | ||
824 | dev->stats.tx_bytes += skb->len; | ||
825 | dev->trans_start = jiffies; | ||
823 | } | 826 | } |
824 | dev->stats.tx_packets++; | ||
825 | dev->stats.tx_bytes += skb->len; | ||
826 | dev->trans_start = jiffies; | ||
827 | kfree_skb(skb); | 827 | kfree_skb(skb); |
828 | 828 | ||
829 | return 0; | 829 | return 0; |
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 30a43cc79e76..7b6f46ddf3c3 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -338,12 +338,6 @@ claw_tx(struct sk_buff *skb, struct net_device *dev) | |||
338 | 338 | ||
339 | CLAW_DBF_TEXT(4, trace, "claw_tx"); | 339 | CLAW_DBF_TEXT(4, trace, "claw_tx"); |
340 | p_ch=&privptr->channel[WRITE]; | 340 | p_ch=&privptr->channel[WRITE]; |
341 | if (skb == NULL) { | ||
342 | privptr->stats.tx_dropped++; | ||
343 | privptr->stats.tx_errors++; | ||
344 | CLAW_DBF_TEXT_(2, trace, "clawtx%d", -EIO); | ||
345 | return -EIO; | ||
346 | } | ||
347 | spin_lock_irqsave(get_ccwdev_lock(p_ch->cdev), saveflags); | 341 | spin_lock_irqsave(get_ccwdev_lock(p_ch->cdev), saveflags); |
348 | rc=claw_hw_tx( skb, dev, 1 ); | 342 | rc=claw_hw_tx( skb, dev, 1 ); |
349 | spin_unlock_irqrestore(get_ccwdev_lock(p_ch->cdev), saveflags); | 343 | spin_unlock_irqrestore(get_ccwdev_lock(p_ch->cdev), saveflags); |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index be716e45f7ac..aec9e5d3cf4b 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -1315,9 +1315,9 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev) | |||
1315 | return NETDEV_TX_BUSY; | 1315 | return NETDEV_TX_BUSY; |
1316 | } | 1316 | } |
1317 | dev->trans_start = jiffies; | 1317 | dev->trans_start = jiffies; |
1318 | rc = netiucv_transmit_skb(privptr->conn, skb) != 0; | 1318 | rc = netiucv_transmit_skb(privptr->conn, skb); |
1319 | netiucv_clear_busy(dev); | 1319 | netiucv_clear_busy(dev); |
1320 | return rc; | 1320 | return rc ? NETDEV_TX_BUSY : NETDEV_TX_OK; |
1321 | } | 1321 | } |
1322 | 1322 | ||
1323 | /** | 1323 | /** |
diff --git a/drivers/staging/at76_usb/at76_usb.c b/drivers/staging/at76_usb/at76_usb.c index c8af9a868d62..3f303ae97b43 100644 --- a/drivers/staging/at76_usb/at76_usb.c +++ b/drivers/staging/at76_usb/at76_usb.c | |||
@@ -3242,12 +3242,11 @@ static int at76_tx(struct sk_buff *skb, struct net_device *netdev) | |||
3242 | "%s: -EINVAL: tx urb %p hcpriv %p complete %p\n", | 3242 | "%s: -EINVAL: tx urb %p hcpriv %p complete %p\n", |
3243 | priv->netdev->name, priv->tx_urb, | 3243 | priv->netdev->name, priv->tx_urb, |
3244 | priv->tx_urb->hcpriv, priv->tx_urb->complete); | 3244 | priv->tx_urb->hcpriv, priv->tx_urb->complete); |
3245 | } else { | 3245 | } else |
3246 | stats->tx_bytes += skb->len; | 3246 | stats->tx_bytes += skb->len; |
3247 | dev_kfree_skb(skb); | ||
3248 | } | ||
3249 | 3247 | ||
3250 | return ret; | 3248 | dev_kfree_skb(skb); |
3249 | return NETDEV_TX_OK; | ||
3251 | } | 3250 | } |
3252 | 3251 | ||
3253 | static void at76_tx_timeout(struct net_device *netdev) | 3252 | static void at76_tx_timeout(struct net_device *netdev) |
diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index 951c73d5db20..59e99cc7786b 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c | |||
@@ -585,11 +585,11 @@ int et131x_tx(struct sk_buff *skb, struct net_device *netdev) | |||
585 | * available | 585 | * available |
586 | */ | 586 | */ |
587 | netif_stop_queue(netdev); | 587 | netif_stop_queue(netdev); |
588 | status = 1; | 588 | status = NETDEV_TX_BUSY; |
589 | } else { | 589 | } else { |
590 | DBG_WARNING(et131x_dbginfo, | 590 | DBG_WARNING(et131x_dbginfo, |
591 | "Misc error; drop packet\n"); | 591 | "Misc error; drop packet\n"); |
592 | status = 0; | 592 | status = NETDEV_TX_OK; |
593 | } | 593 | } |
594 | } | 594 | } |
595 | 595 | ||
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c index 33a0687252af..1294e05fcf13 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c | |||
@@ -814,7 +814,7 @@ int ieee80211_xmit(struct sk_buff *skb, | |||
814 | spin_unlock_irqrestore(&ieee->lock, flags); | 814 | spin_unlock_irqrestore(&ieee->lock, flags); |
815 | netif_stop_queue(dev); | 815 | netif_stop_queue(dev); |
816 | stats->tx_errors++; | 816 | stats->tx_errors++; |
817 | return 1; | 817 | return NETDEV_TX_BUSY; |
818 | 818 | ||
819 | } | 819 | } |
820 | 820 | ||
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 393e4df70dfd..bc0d764d851a 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c | |||
@@ -432,21 +432,21 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb, | |||
432 | /* success and more buf */ | 432 | /* success and more buf */ |
433 | /* avail, re: hw_txdata */ | 433 | /* avail, re: hw_txdata */ |
434 | netif_wake_queue(wlandev->netdev); | 434 | netif_wake_queue(wlandev->netdev); |
435 | result = 0; | 435 | result = NETDEV_TX_OK; |
436 | } else if (txresult == 1) { | 436 | } else if (txresult == 1) { |
437 | /* success, no more avail */ | 437 | /* success, no more avail */ |
438 | pr_debug("txframe success, no more bufs\n"); | 438 | pr_debug("txframe success, no more bufs\n"); |
439 | /* netdev->tbusy = 1; don't set here, irqhdlr */ | 439 | /* netdev->tbusy = 1; don't set here, irqhdlr */ |
440 | /* may have already cleared it */ | 440 | /* may have already cleared it */ |
441 | result = 0; | 441 | result = NETDEV_TX_OK; |
442 | } else if (txresult == 2) { | 442 | } else if (txresult == 2) { |
443 | /* alloc failure, drop frame */ | 443 | /* alloc failure, drop frame */ |
444 | pr_debug("txframe returned alloc_fail\n"); | 444 | pr_debug("txframe returned alloc_fail\n"); |
445 | result = 1; | 445 | result = NETDEV_TX_BUSY; |
446 | } else { | 446 | } else { |
447 | /* buffer full or queue busy, drop frame. */ | 447 | /* buffer full or queue busy, drop frame. */ |
448 | pr_debug("txframe returned full or busy\n"); | 448 | pr_debug("txframe returned full or busy\n"); |
449 | result = 1; | 449 | result = NETDEV_TX_BUSY; |
450 | } | 450 | } |
451 | 451 | ||
452 | failed: | 452 | failed: |
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 4007770f7ed2..016f63b39028 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
@@ -520,7 +520,7 @@ static int eth_start_xmit(struct sk_buff *skb, struct net_device *net) | |||
520 | */ | 520 | */ |
521 | if (list_empty(&dev->tx_reqs)) { | 521 | if (list_empty(&dev->tx_reqs)) { |
522 | spin_unlock_irqrestore(&dev->req_lock, flags); | 522 | spin_unlock_irqrestore(&dev->req_lock, flags); |
523 | return 1; | 523 | return NETDEV_TX_BUSY; |
524 | } | 524 | } |
525 | 525 | ||
526 | req = container_of(dev->tx_reqs.next, struct usb_request, list); | 526 | req = container_of(dev->tx_reqs.next, struct usb_request, list); |