diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-16 20:24:53 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-16 20:24:53 -0400 |
commit | 492b057c426e4aa747484958e18e9da29003985d (patch) | |
tree | 34e08c24618688d8bcc190523028b5f94cce0c0b /drivers/net/sun3lance.c | |
parent | 313485175da221c388f6a8ecf4c30062ba9bea17 (diff) | |
parent | 300df7dc89cc276377fc020704e34875d5c473b6 (diff) |
Merge commit 'origin/master' into next
Diffstat (limited to 'drivers/net/sun3lance.c')
-rw-r--r-- | drivers/net/sun3lance.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c index e5beb299cbd0..534dfe3eef6f 100644 --- a/drivers/net/sun3lance.c +++ b/drivers/net/sun3lance.c | |||
@@ -294,6 +294,16 @@ out: | |||
294 | return ERR_PTR(err); | 294 | return ERR_PTR(err); |
295 | } | 295 | } |
296 | 296 | ||
297 | static const struct net_device_ops lance_netdev_ops = { | ||
298 | .ndo_open = lance_open, | ||
299 | .ndo_stop = lance_close, | ||
300 | .ndo_start_xmit = lance_start_xmit, | ||
301 | .ndo_set_multicast_list = set_multicast_list, | ||
302 | .ndo_set_mac_address = NULL, | ||
303 | .ndo_change_mtu = eth_change_mtu, | ||
304 | .ndo_validate_addr = eth_validate_addr, | ||
305 | }; | ||
306 | |||
297 | static int __init lance_probe( struct net_device *dev) | 307 | static int __init lance_probe( struct net_device *dev) |
298 | { | 308 | { |
299 | unsigned long ioaddr; | 309 | unsigned long ioaddr; |
@@ -397,12 +407,7 @@ static int __init lance_probe( struct net_device *dev) | |||
397 | if (did_version++ == 0) | 407 | if (did_version++ == 0) |
398 | printk( version ); | 408 | printk( version ); |
399 | 409 | ||
400 | /* The LANCE-specific entries in the device structure. */ | 410 | dev->netdev_ops = &lance_netdev_ops; |
401 | dev->open = &lance_open; | ||
402 | dev->hard_start_xmit = &lance_start_xmit; | ||
403 | dev->stop = &lance_close; | ||
404 | dev->set_multicast_list = &set_multicast_list; | ||
405 | dev->set_mac_address = NULL; | ||
406 | // KLUDGE -- REMOVE ME | 411 | // KLUDGE -- REMOVE ME |
407 | set_bit(__LINK_STATE_PRESENT, &dev->state); | 412 | set_bit(__LINK_STATE_PRESENT, &dev->state); |
408 | 413 | ||
@@ -521,7 +526,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) | |||
521 | if (netif_queue_stopped(dev)) { | 526 | if (netif_queue_stopped(dev)) { |
522 | int tickssofar = jiffies - dev->trans_start; | 527 | int tickssofar = jiffies - dev->trans_start; |
523 | if (tickssofar < 20) | 528 | if (tickssofar < 20) |
524 | return( 1 ); | 529 | return NETDEV_TX_BUSY; |
525 | 530 | ||
526 | DPRINTK( 1, ( "%s: transmit timed out, status %04x, resetting.\n", | 531 | DPRINTK( 1, ( "%s: transmit timed out, status %04x, resetting.\n", |
527 | dev->name, DREG )); | 532 | dev->name, DREG )); |
@@ -572,7 +577,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) | |||
572 | if (test_and_set_bit( 0, (void*)&lp->lock ) != 0) { | 577 | if (test_and_set_bit( 0, (void*)&lp->lock ) != 0) { |
573 | printk( "%s: tx queue lock!.\n", dev->name); | 578 | printk( "%s: tx queue lock!.\n", dev->name); |
574 | /* don't clear dev->tbusy flag. */ | 579 | /* don't clear dev->tbusy flag. */ |
575 | return 1; | 580 | return NETDEV_TX_BUSY; |
576 | } | 581 | } |
577 | 582 | ||
578 | AREG = CSR0; | 583 | AREG = CSR0; |