diff options
author | Patrick McHardy <kaber@trash.net> | 2009-06-12 02:22:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-13 04:18:50 -0400 |
commit | 5b548140225c6bbbbd560551dd1048b2c0ce58be (patch) | |
tree | 9306a37dbca0095ca6d88e0b0ab297bcb2dc5ae8 /drivers/net/sun3lance.c | |
parent | 5b2c4b972c0226406361f83b747eb5cdab51e68e (diff) |
net: use symbolic values for ndo_start_xmit() return codes
Convert magic values 1 and -1 to NETDEV_TX_BUSY and NETDEV_TX_LOCKED respectively.
0 (NETDEV_TX_OK) is not changed to keep the noise down, except in very few cases
where its in direct proximity to one of the other values.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sun3lance.c')
-rw-r--r-- | drivers/net/sun3lance.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |