aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sgiseeq.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-05-10 08:01:31 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-10 08:01:31 -0400
commit1ae5dc342ac78d7a42965fd1f323815f6f5ef2c1 (patch)
treed1955a7639e99832590df26466a34d5786a880ae /drivers/net/sgiseeq.c
parent2b0b05ddc04b6d45e71cd36405df512075786f1e (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/sgiseeq.c')
-rw-r--r--drivers/net/sgiseeq.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index c8fc896fc460..cc4bd8c65f8b 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -574,7 +574,7 @@ static inline int sgiseeq_reset(struct net_device *dev)
574 if (err) 574 if (err)
575 return err; 575 return err;
576 576
577 dev->trans_start = jiffies; 577 dev->trans_start = jiffies; /* prevent tx timeout */
578 netif_wake_queue(dev); 578 netif_wake_queue(dev);
579 579
580 return 0; 580 return 0;
@@ -638,8 +638,6 @@ static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev)
638 if (!(hregs->tx_ctrl & HPC3_ETXCTRL_ACTIVE)) 638 if (!(hregs->tx_ctrl & HPC3_ETXCTRL_ACTIVE))
639 kick_tx(dev, sp, hregs); 639 kick_tx(dev, sp, hregs);
640 640
641 dev->trans_start = jiffies;
642
643 if (!TX_BUFFS_AVAIL(sp)) 641 if (!TX_BUFFS_AVAIL(sp))
644 netif_stop_queue(dev); 642 netif_stop_queue(dev);
645 spin_unlock_irqrestore(&sp->tx_lock, flags); 643 spin_unlock_irqrestore(&sp->tx_lock, flags);
@@ -652,7 +650,7 @@ static void timeout(struct net_device *dev)
652 printk(KERN_NOTICE "%s: transmit timed out, resetting\n", dev->name); 650 printk(KERN_NOTICE "%s: transmit timed out, resetting\n", dev->name);
653 sgiseeq_reset(dev); 651 sgiseeq_reset(dev);
654 652
655 dev->trans_start = jiffies; 653 dev->trans_start = jiffies; /* prevent tx timeout */
656 netif_wake_queue(dev); 654 netif_wake_queue(dev);
657} 655}
658 656