Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150948
b: refs/heads/master
c: 9d794a0
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jun 14, 2009
1 parent 7cebb44 commit aac0e89
Show file tree
Hide file tree
Showing 119 changed files with 624 additions and 454 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e0057975e09a85ac92be81e975d0d0a911b1c4c6
refs/heads/master: 9d794a0c1dbb9551d870683bca0744624db353ed
3 changes: 0 additions & 3 deletions trunk/Documentation/networking/operstates.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ ifinfomsg::if_flags & IFF_LOWER_UP:
ifinfomsg::if_flags & IFF_DORMANT:
Driver has signaled netif_dormant_on()

These interface flags can also be queried without netlink using the
SIOCGIFFLAGS ioctl.

TLV IFLA_OPERSTATE

contains RFC2863 state of the interface in numeric representation:
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/isdn/i4l/isdn_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
lp = isdn_net_get_locked_lp(nd);
if (!lp) {
printk(KERN_WARNING "%s: all channels busy - requeuing!\n", ndev->name);
return 1;
return NETDEV_TX_BUSY;
}
/* we have our lp locked from now on */

Expand Down Expand Up @@ -1273,14 +1273,14 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
spin_unlock_irqrestore(&dev->lock, flags);
isdn_net_dial(); /* Initiate dialing */
netif_stop_queue(ndev);
return 1; /* let upper layer requeue skb packet */
return NETDEV_TX_BUSY; /* let upper layer requeue skb packet */
}
#endif
/* Initiate dialing */
spin_unlock_irqrestore(&dev->lock, flags);
isdn_net_dial();
isdn_net_device_stop_queue(lp);
return 1;
return NETDEV_TX_BUSY;
} else {
isdn_net_unreachable(ndev, skb,
"No phone number");
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/message/fusion/mptlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)

printk (KERN_ERR "%s: no tx context available: %u\n",
__func__, priv->mpt_txfidx_tail);
return 1;
return NETDEV_TX_BUSY;
}

mf = mpt_get_msg_frame(LanCtx, mpt_dev);
Expand All @@ -713,7 +713,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)

printk (KERN_ERR "%s: Unable to alloc request frame\n",
__func__);
return 1;
return NETDEV_TX_BUSY;
}

ctx = priv->mpt_txfidx[priv->mpt_txfidx_tail--];
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/misc/sgi-xp/xpnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
"packet\n", sizeof(struct xpnet_pending_msg));

dev->stats.tx_errors++;
return -ENOMEM;
dev_kfree_skb(skb);
return NETDEV_TX_OK;
}

/* get the beginning of the first cacheline and end of last */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/3c505.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev)
pr_debug("%s: failed to transmit packet\n", dev->name);
}
spin_unlock_irqrestore(&adapter->lock, flags);
return 1;
return NETDEV_TX_BUSY;
}
if (elp_debug >= 3)
pr_debug("%s: packet of length %d sent\n", dev->name, (int) skb->len);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/3c515.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb,
int i;

if (vp->tx_full) /* No room to transmit with */
return 1;
return NETDEV_TX_BUSY;
if (vp->cur_tx != 0)
prev_entry = &vp->tx_ring[(vp->cur_tx - 1) % TX_RING_SIZE];
else
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/3c527.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
netif_stop_queue(dev);

if(atomic_read(&lp->tx_count)==0) {
return 1;
return NETDEV_TX_BUSY;
}

if (skb_padto(skb, ETH_ZLEN)) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2107,7 +2107,7 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
pr_warning("%s: BUG! Tx Ring full, refusing to send buffer.\n",
dev->name);
netif_stop_queue(dev);
return 1;
return NETDEV_TX_BUSY;
}

vp->tx_skbuff[entry] = skb;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/7990.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
unsigned long flags;

if (!TX_BUFFS_AVAIL)
return -1;
return NETDEV_TX_LOCKED;

netif_stop_queue (dev);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
spin_unlock_irqrestore(&cp->lock, intr_flags);
pr_err(PFX "%s: BUG! Tx Ring full when queue awake!\n",
dev->name);
return 1;
return NETDEV_TX_BUSY;
}

#if CP_VLAN_TAG_USED
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/a2065.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)

if (!TX_BUFFS_AVAIL){
local_irq_restore(flags);
return -1;
return NETDEV_TX_LOCKED;
}

#ifdef DEBUG_DRIVER
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/arm/at91_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
dev->trans_start = jiffies;
} else {
printk(KERN_ERR "at91_ether.c: at91ether_start_xmit() called, but device is busy!\n");
return 1; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb)
return NETDEV_TX_BUSY; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb)
on this skb, he also reports -ENETDOWN and printk's, so either
we free and return(0) or don't free and return 1 */
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/arm/ether3.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev)

if (priv(dev)->tx_tail == next_ptr) {
local_irq_restore(flags);
return 1; /* unable to queue */
return NETDEV_TX_BUSY; /* unable to queue */
}

dev->trans_start = jiffies;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/au1000_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
/* We've wrapped around and the transmitter is still busy */
netif_stop_queue(dev);
aup->tx_full = 1;
return 1;
return NETDEV_TX_BUSY;
}
else if (buff_stat & TX_T_DONE) {
update_tx_stats(dev, ptxd->status);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -2934,7 +2934,7 @@ static int cas_start_xmit(struct sk_buff *skb, struct net_device *dev)
* individual queues.
*/
if (cas_xmit_tx_ringN(cp, ring++ & N_TX_RINGS_MASK, skb))
return 1;
return NETDEV_TX_BUSY;
dev->trans_start = jiffies;
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/cs89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev)

spin_unlock_irq(&lp->lock);
if (net_debug) printk("cs89x0: Tx buffer not free!\n");
return 1;
return NETDEV_TX_BUSY;
}
/* Write the contents of the packet */
writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/de600.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,14 @@ static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (free_tx_pages <= 0) { /* Do timeouts, to avoid hangs. */
tickssofar = jiffies - dev->trans_start;
if (tickssofar < 5)
return 1;
return NETDEV_TX_BUSY;
/* else */
printk(KERN_WARNING "%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem");
/* Restart the adapter. */
spin_lock_irqsave(&de600_lock, flags);
if (adapter_init(dev)) {
spin_unlock_irqrestore(&de600_lock, flags);
return 1;
return NETDEV_TX_BUSY;
}
spin_unlock_irqrestore(&de600_lock, flags);
}
Expand All @@ -199,7 +199,7 @@ static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (was_down || (de600_read_byte(READ_DATA, dev) != 0xde)) {
if (adapter_init(dev)) {
spin_unlock_irqrestore(&de600_lock, flags);
return 1;
return NETDEV_TX_BUSY;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/de620.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ static int de620_start_xmit(struct sk_buff *skb, struct net_device *dev)
case (TXBF0 | TXBF1): /* NONE!!! */
printk(KERN_WARNING "%s: No tx-buffer available!\n", dev->name);
spin_unlock_irqrestore(&de620_lock, flags);
return 1;
return NETDEV_TX_BUSY;
}
de620_write_block(dev, buffer, skb->len, len-skb->len);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/defxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3318,7 +3318,7 @@ static int dfx_xmt_queue_pkt(
{
skb_pull(skb,3);
spin_unlock_irqrestore(&bp->lock, flags);
return(1); /* requeue packet for later */
return NETDEV_TX_BUSY; /* requeue packet for later */
}

/*
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/depca.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (TX_BUFFS_AVAIL)
netif_start_queue(dev);
} else
status = -1;
status = NETDEV_TX_LOCKED;

out:
return status;
Expand Down Expand Up @@ -1839,7 +1839,7 @@ static int load_packet(struct net_device *dev, struct sk_buff *skb)

lp->tx_new = (++end) & lp->txRingMask; /* update current pointers */
} else {
status = -1;
status = NETDEV_TX_LOCKED;
}

return status;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/dm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev)
dm9000_dbg(db, 3, "%s:\n", __func__);

if (db->tx_pkt_cnt > 1)
return 1;
return NETDEV_TX_BUSY;

spin_lock_irqsave(&db->lock, flags);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ static int e100_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
/* This is a hard error - log it. */
DPRINTK(TX_ERR, DEBUG, "Out of Tx resources, returning skb\n");
netif_stop_queue(netdev);
return 1;
return NETDEV_TX_BUSY;
}

netdev->trans_start = jiffies;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/ethoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ static int ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)

if (unlikely(skb->len > ETHOC_BUFSIZ)) {
priv->stats.tx_errors++;
return -EMSGSIZE;
goto out;
}

entry = priv->cur_tx % priv->num_tx;
Expand Down Expand Up @@ -840,9 +840,9 @@ static int ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
}

dev->trans_start = jiffies;
dev_kfree_skb(skb);

spin_unlock_irq(&priv->lock);
out:
dev_kfree_skb(skb);
return NETDEV_TX_OK;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ewrk3.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ static int ewrk3_queue_pkt (struct sk_buff *skb, struct net_device *dev)
err_out:
ENABLE_IRQs;
spin_unlock_irq (&lp->hw_lock);
return 1;
return NETDEV_TX_BUSY;
}

/*
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)

if (!fep->link) {
/* Link is down or autonegotiation is in progress. */
return 1;
return NETDEV_TX_BUSY;
}

spin_lock_irqsave(&fep->hw_lock, flags);
Expand All @@ -305,7 +305,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
*/
printk("%s: tx queue full!.\n", dev->name);
spin_unlock_irqrestore(&fep->hw_lock, flags);
return 1;
return NETDEV_TX_BUSY;
}

/* Clear all of the status flags */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/hamachi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev)
status=readw(hmp->base + TxStatus);
if( !(status & 0x0001) || (status & 0x0002))
writew(0x0001, hmp->base + TxCmd);
return 1;
return NETDEV_TX_BUSY;
}

/* Caution: the write order is important here, set the field
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/hamradio/baycom_epp.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ static int baycom_send_packet(struct sk_buff *skb, struct net_device *dev)
return 0;
}
if (bc->skb)
return -1;
return NETDEV_TX_LOCKED;
/* strip KISS byte */
if (skb->len >= HDLCDRV_MAXFLEN+1 || skb->len < 3) {
dev_kfree_skb(skb);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/hamradio/bpqether.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev)
if ((newskb = skb_realloc_headroom(skb, AX25_BPQ_HEADER_LEN)) == NULL) {
printk(KERN_WARNING "bpqether: out of memory\n");
kfree_skb(skb);
return -ENOMEM;
return NETDEV_TX_OK;
}

if (skb->sk != NULL)
Expand All @@ -294,7 +294,7 @@ static int bpq_xmit(struct sk_buff *skb, struct net_device *dev)
if ((dev = bpq_get_ether_dev(dev)) == NULL) {
dev->stats.tx_dropped++;
kfree_skb(skb);
return -ENODEV;
return NETDEV_TX_OK;
}

skb->protocol = ax25_type_trans(skb, dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/hamradio/hdlcdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ static int hdlcdrv_send_packet(struct sk_buff *skb, struct net_device *dev)
return 0;
}
if (sm->skb)
return -1;
return NETDEV_TX_LOCKED;
netif_stop_queue(dev);
sm->skb = skb;
return 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/hamradio/mkiss.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ static int ax_xmit(struct sk_buff *skb, struct net_device *dev)

if (!netif_running(dev)) {
printk(KERN_ERR "mkiss: %s: xmit call when iface is down\n", dev->name);
return 1;
return NETDEV_TX_BUSY;
}

if (netif_queue_stopped(dev)) {
Expand All @@ -541,7 +541,7 @@ static int ax_xmit(struct sk_buff *skb, struct net_device *dev)
*/
if (time_before(jiffies, dev->trans_start + 20 * HZ)) {
/* 20 sec timeout not reached */
return 1;
return NETDEV_TX_BUSY;
}

printk(KERN_ERR "mkiss: %s: transmit timed out, %s?\n", dev->name,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ibm_newemac/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ static int emac_start_xmit_sg(struct sk_buff *skb, struct net_device *ndev)
stop_queue:
netif_stop_queue(ndev);
DBG2(dev, "stopped TX queue" NL);
return 1;
return NETDEV_TX_BUSY;
}

/* Tx lock BHs */
Expand Down
Loading

0 comments on commit aac0e89

Please sign in to comment.