aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/natsemi.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/natsemi.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/natsemi.c')
-rw-r--r--drivers/net/natsemi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 9250bf6573ec..2a17b503feaa 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -1905,7 +1905,7 @@ static void ns_tx_timeout(struct net_device *dev)
1905 spin_unlock_irq(&np->lock); 1905 spin_unlock_irq(&np->lock);
1906 enable_irq(dev->irq); 1906 enable_irq(dev->irq);
1907 1907
1908 dev->trans_start = jiffies; 1908 dev->trans_start = jiffies; /* prevent tx timeout */
1909 np->stats.tx_errors++; 1909 np->stats.tx_errors++;
1910 netif_wake_queue(dev); 1910 netif_wake_queue(dev);
1911} 1911}
@@ -2119,8 +2119,6 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev)
2119 } 2119 }
2120 spin_unlock_irqrestore(&np->lock, flags); 2120 spin_unlock_irqrestore(&np->lock, flags);
2121 2121
2122 dev->trans_start = jiffies;
2123
2124 if (netif_msg_tx_queued(np)) { 2122 if (netif_msg_tx_queued(np)) {
2125 printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d.\n", 2123 printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d.\n",
2126 dev->name, np->cur_tx, entry); 2124 dev->name, np->cur_tx, entry);