diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-05-10 08:01:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-10 08:01:31 -0400 |
commit | 1ae5dc342ac78d7a42965fd1f323815f6f5ef2c1 (patch) | |
tree | d1955a7639e99832590df26466a34d5786a880ae /drivers/net/7990.c | |
parent | 2b0b05ddc04b6d45e71cd36405df512075786f1e (diff) |
net: trans_start cleanups
Now that core network takes care of trans_start updates, dont do it
in drivers themselves, if possible. Drivers can avoid one cache miss
(on dev->trans_start) in their start_xmit() handler.
Exceptions are NETIF_F_LLTX drivers
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/7990.c')
-rw-r--r-- | drivers/net/7990.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/7990.c b/drivers/net/7990.c index f09e59451495..561d3d582813 100644 --- a/drivers/net/7990.c +++ b/drivers/net/7990.c | |||
@@ -262,7 +262,7 @@ static int lance_reset (struct net_device *dev) | |||
262 | 262 | ||
263 | load_csrs (lp); | 263 | load_csrs (lp); |
264 | lance_init_ring (dev); | 264 | lance_init_ring (dev); |
265 | dev->trans_start = jiffies; | 265 | dev->trans_start = jiffies; /* prevent tx timeout */ |
266 | status = init_restart_lance (lp); | 266 | status = init_restart_lance (lp); |
267 | #ifdef DEBUG_DRIVER | 267 | #ifdef DEBUG_DRIVER |
268 | printk ("Lance restart=%d\n", status); | 268 | printk ("Lance restart=%d\n", status); |
@@ -526,7 +526,7 @@ void lance_tx_timeout(struct net_device *dev) | |||
526 | { | 526 | { |
527 | printk("lance_tx_timeout\n"); | 527 | printk("lance_tx_timeout\n"); |
528 | lance_reset(dev); | 528 | lance_reset(dev); |
529 | dev->trans_start = jiffies; | 529 | dev->trans_start = jiffies; /* prevent tx timeout */ |
530 | netif_wake_queue (dev); | 530 | netif_wake_queue (dev); |
531 | } | 531 | } |
532 | EXPORT_SYMBOL_GPL(lance_tx_timeout); | 532 | EXPORT_SYMBOL_GPL(lance_tx_timeout); |
@@ -574,7 +574,6 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
574 | outs++; | 574 | outs++; |
575 | /* Kick the lance: transmit now */ | 575 | /* Kick the lance: transmit now */ |
576 | WRITERDP(lp, LE_C0_INEA | LE_C0_TDMD); | 576 | WRITERDP(lp, LE_C0_INEA | LE_C0_TDMD); |
577 | dev->trans_start = jiffies; | ||
578 | dev_kfree_skb (skb); | 577 | dev_kfree_skb (skb); |
579 | 578 | ||
580 | spin_lock_irqsave (&lp->devlock, flags); | 579 | spin_lock_irqsave (&lp->devlock, flags); |