aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/lance.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/lance.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/lance.c')
-rw-r--r--drivers/net/lance.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/lance.c b/drivers/net/lance.c
index 7b9447646f8a..21f8adaa87c1 100644
--- a/drivers/net/lance.c
+++ b/drivers/net/lance.c
@@ -945,7 +945,7 @@ static void lance_tx_timeout (struct net_device *dev)
945#endif 945#endif
946 lance_restart (dev, 0x0043, 1); 946 lance_restart (dev, 0x0043, 1);
947 947
948 dev->trans_start = jiffies; 948 dev->trans_start = jiffies; /* prevent tx timeout */
949 netif_wake_queue (dev); 949 netif_wake_queue (dev);
950} 950}
951 951
@@ -1011,8 +1011,6 @@ static netdev_tx_t lance_start_xmit(struct sk_buff *skb,
1011 outw(0x0000, ioaddr+LANCE_ADDR); 1011 outw(0x0000, ioaddr+LANCE_ADDR);
1012 outw(0x0048, ioaddr+LANCE_DATA); 1012 outw(0x0048, ioaddr+LANCE_DATA);
1013 1013
1014 dev->trans_start = jiffies;
1015
1016 if ((lp->cur_tx - lp->dirty_tx) >= TX_RING_SIZE) 1014 if ((lp->cur_tx - lp->dirty_tx) >= TX_RING_SIZE)
1017 netif_stop_queue(dev); 1015 netif_stop_queue(dev);
1018 1016