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/xilinx_emaclite.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/xilinx_emaclite.c')
-rw-r--r-- | drivers/net/xilinx_emaclite.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 93828d565390..a7db68d37ee9 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c | |||
@@ -558,7 +558,7 @@ static void xemaclite_tx_timeout(struct net_device *dev) | |||
558 | } | 558 | } |
559 | 559 | ||
560 | /* To exclude tx timeout */ | 560 | /* To exclude tx timeout */ |
561 | dev->trans_start = 0xffffffff - TX_TIMEOUT - TX_TIMEOUT; | 561 | dev->trans_start = jiffies; /* prevent tx timeout */ |
562 | 562 | ||
563 | /* We're all ready to go. Start the queue */ | 563 | /* We're all ready to go. Start the queue */ |
564 | netif_wake_queue(dev); | 564 | netif_wake_queue(dev); |
@@ -590,7 +590,7 @@ static void xemaclite_tx_handler(struct net_device *dev) | |||
590 | dev->stats.tx_bytes += lp->deferred_skb->len; | 590 | dev->stats.tx_bytes += lp->deferred_skb->len; |
591 | dev_kfree_skb_irq(lp->deferred_skb); | 591 | dev_kfree_skb_irq(lp->deferred_skb); |
592 | lp->deferred_skb = NULL; | 592 | lp->deferred_skb = NULL; |
593 | dev->trans_start = jiffies; | 593 | dev->trans_start = jiffies; /* prevent tx timeout */ |
594 | netif_wake_queue(dev); | 594 | netif_wake_queue(dev); |
595 | } | 595 | } |
596 | } | 596 | } |
@@ -1054,7 +1054,6 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) | |||
1054 | 1054 | ||
1055 | dev->stats.tx_bytes += len; | 1055 | dev->stats.tx_bytes += len; |
1056 | dev_kfree_skb(new_skb); | 1056 | dev_kfree_skb(new_skb); |
1057 | dev->trans_start = jiffies; | ||
1058 | 1057 | ||
1059 | return 0; | 1058 | return 0; |
1060 | } | 1059 | } |