aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sundance.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/sundance.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/sundance.c')
-rw-r--r--drivers/net/sundance.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index da45f01279c4..16803251a999 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -972,7 +972,7 @@ static void tx_timeout(struct net_device *dev)
972 972
973 dev->if_port = 0; 973 dev->if_port = 0;
974 974
975 dev->trans_start = jiffies; 975 dev->trans_start = jiffies; /* prevent tx timeout */
976 dev->stats.tx_errors++; 976 dev->stats.tx_errors++;
977 if (np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) { 977 if (np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) {
978 netif_wake_queue(dev); 978 netif_wake_queue(dev);
@@ -1084,7 +1084,6 @@ start_tx (struct sk_buff *skb, struct net_device *dev)
1084 } else { 1084 } else {
1085 netif_stop_queue (dev); 1085 netif_stop_queue (dev);
1086 } 1086 }
1087 dev->trans_start = jiffies;
1088 if (netif_msg_tx_queued(np)) { 1087 if (netif_msg_tx_queued(np)) {
1089 printk (KERN_DEBUG 1088 printk (KERN_DEBUG
1090 "%s: Transmit frame #%d queued in slot %d.\n", 1089 "%s: Transmit frame #%d queued in slot %d.\n",