diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-05-27 20:00:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-29 04:46:27 -0400 |
commit | cdd0db058d64f2619b08e7d098ee0014aa0a5bc1 (patch) | |
tree | a5e31f6687eff581309b095781c7e2f0bc676182 | |
parent | 28679751a924c11f7135641f26e99249385de5b4 (diff) |
net: dont update dev->trans_start
Second round of drivers for Gb cards (and NIU one I forgot in the 10GB round)
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>
-rw-r--r-- | drivers/net/acenic.c | 1 | ||||
-rw-r--r-- | drivers/net/atl1c/atl1c_main.c | 1 | ||||
-rw-r--r-- | drivers/net/atl1e/atl1e_main.c | 2 | ||||
-rw-r--r-- | drivers/net/atlx/atl1.c | 1 | ||||
-rw-r--r-- | drivers/net/bnx2.c | 1 | ||||
-rw-r--r-- | drivers/net/dl2k.c | 8 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 1 | ||||
-rw-r--r-- | drivers/net/e1000e/netdev.c | 1 | ||||
-rw-r--r-- | drivers/net/hamachi.c | 3 | ||||
-rw-r--r-- | drivers/net/igb/igb_main.c | 1 | ||||
-rw-r--r-- | drivers/net/igbvf/netdev.c | 1 | ||||
-rw-r--r-- | drivers/net/jme.c | 1 | ||||
-rw-r--r-- | drivers/net/niu.c | 2 | ||||
-rw-r--r-- | drivers/net/ns83820.c | 6 | ||||
-rw-r--r-- | drivers/net/qla3xxx.c | 1 | ||||
-rw-r--r-- | drivers/net/r8169.c | 2 | ||||
-rw-r--r-- | drivers/net/sis190.c | 2 | ||||
-rw-r--r-- | drivers/net/skge.c | 2 | ||||
-rw-r--r-- | drivers/net/sky2.c | 1 | ||||
-rw-r--r-- | drivers/net/tg3.c | 8 | ||||
-rw-r--r-- | drivers/net/yellowfin.c | 3 |
21 files changed, 10 insertions, 39 deletions
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index 57bc71527850..08419ee10290 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c | |||
@@ -2573,7 +2573,6 @@ restart: | |||
2573 | netif_wake_queue(dev); | 2573 | netif_wake_queue(dev); |
2574 | } | 2574 | } |
2575 | 2575 | ||
2576 | dev->trans_start = jiffies; | ||
2577 | return NETDEV_TX_OK; | 2576 | return NETDEV_TX_OK; |
2578 | 2577 | ||
2579 | overflow: | 2578 | overflow: |
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c index fc1092b835d2..ac76136d70f9 100644 --- a/drivers/net/atl1c/atl1c_main.c +++ b/drivers/net/atl1c/atl1c_main.c | |||
@@ -2113,7 +2113,6 @@ static int atl1c_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2113 | atl1c_tx_map(adapter, skb, tpd, type); | 2113 | atl1c_tx_map(adapter, skb, tpd, type); |
2114 | atl1c_tx_queue(adapter, skb, tpd, type); | 2114 | atl1c_tx_queue(adapter, skb, tpd, type); |
2115 | 2115 | ||
2116 | netdev->trans_start = jiffies; | ||
2117 | spin_unlock_irqrestore(&adapter->tx_lock, flags); | 2116 | spin_unlock_irqrestore(&adapter->tx_lock, flags); |
2118 | return NETDEV_TX_OK; | 2117 | return NETDEV_TX_OK; |
2119 | } | 2118 | } |
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c index c271b7537fab..a01383d53a03 100644 --- a/drivers/net/atl1e/atl1e_main.c +++ b/drivers/net/atl1e/atl1e_main.c | |||
@@ -1893,7 +1893,7 @@ static int atl1e_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1893 | atl1e_tx_map(adapter, skb, tpd); | 1893 | atl1e_tx_map(adapter, skb, tpd); |
1894 | atl1e_tx_queue(adapter, tpd_req, tpd); | 1894 | atl1e_tx_queue(adapter, tpd_req, tpd); |
1895 | 1895 | ||
1896 | netdev->trans_start = jiffies; | 1896 | netdev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */ |
1897 | spin_unlock_irqrestore(&adapter->tx_lock, flags); | 1897 | spin_unlock_irqrestore(&adapter->tx_lock, flags); |
1898 | return NETDEV_TX_OK; | 1898 | return NETDEV_TX_OK; |
1899 | } | 1899 | } |
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 13f0bdc32449..fccfbf2cf932 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c | |||
@@ -2431,7 +2431,6 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2431 | atl1_tx_queue(adapter, count, ptpd); | 2431 | atl1_tx_queue(adapter, count, ptpd); |
2432 | atl1_update_mailbox(adapter); | 2432 | atl1_update_mailbox(adapter); |
2433 | mmiowb(); | 2433 | mmiowb(); |
2434 | netdev->trans_start = jiffies; | ||
2435 | return NETDEV_TX_OK; | 2434 | return NETDEV_TX_OK; |
2436 | } | 2435 | } |
2437 | 2436 | ||
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index c37acc1d10ac..83ee0f53f2d2 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -6211,7 +6211,6 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6211 | mmiowb(); | 6211 | mmiowb(); |
6212 | 6212 | ||
6213 | txr->tx_prod = prod; | 6213 | txr->tx_prod = prod; |
6214 | dev->trans_start = jiffies; | ||
6215 | 6214 | ||
6216 | if (unlikely(bnx2_tx_avail(bp, txr) <= MAX_SKB_FRAGS)) { | 6215 | if (unlikely(bnx2_tx_avail(bp, txr) <= MAX_SKB_FRAGS)) { |
6217 | netif_tx_stop_queue(txq); | 6216 | netif_tx_stop_queue(txq); |
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index 4a1b554654eb..895d72143ee0 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c | |||
@@ -539,7 +539,7 @@ rio_tx_timeout (struct net_device *dev) | |||
539 | dev->name, readl (ioaddr + TxStatus)); | 539 | dev->name, readl (ioaddr + TxStatus)); |
540 | rio_free_tx(dev, 0); | 540 | rio_free_tx(dev, 0); |
541 | dev->if_port = 0; | 541 | dev->if_port = 0; |
542 | dev->trans_start = jiffies; | 542 | dev->trans_start = jiffies; /* prevent tx timeout */ |
543 | } | 543 | } |
544 | 544 | ||
545 | /* allocate and initialize Tx and Rx descriptors */ | 545 | /* allocate and initialize Tx and Rx descriptors */ |
@@ -610,7 +610,7 @@ start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
610 | 610 | ||
611 | if (np->link_status == 0) { /* Link Down */ | 611 | if (np->link_status == 0) { /* Link Down */ |
612 | dev_kfree_skb(skb); | 612 | dev_kfree_skb(skb); |
613 | return 0; | 613 | return NETDEV_TX_OK; |
614 | } | 614 | } |
615 | ioaddr = dev->base_addr; | 615 | ioaddr = dev->base_addr; |
616 | entry = np->cur_tx % TX_RING_SIZE; | 616 | entry = np->cur_tx % TX_RING_SIZE; |
@@ -665,9 +665,7 @@ start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
665 | writel (0, dev->base_addr + TFDListPtr1); | 665 | writel (0, dev->base_addr + TFDListPtr1); |
666 | } | 666 | } |
667 | 667 | ||
668 | /* NETDEV WATCHDOG timer */ | 668 | return NETDEV_TX_OK; |
669 | dev->trans_start = jiffies; | ||
670 | return 0; | ||
671 | } | 669 | } |
672 | 670 | ||
673 | static irqreturn_t | 671 | static irqreturn_t |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 9a32d0c73cb3..79fe1ee3da52 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -3365,7 +3365,6 @@ static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
3365 | 3365 | ||
3366 | if (count) { | 3366 | if (count) { |
3367 | e1000_tx_queue(adapter, tx_ring, tx_flags, count); | 3367 | e1000_tx_queue(adapter, tx_ring, tx_flags, count); |
3368 | netdev->trans_start = jiffies; | ||
3369 | /* Make sure there is space in the ring for the next send. */ | 3368 | /* Make sure there is space in the ring for the next send. */ |
3370 | e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2); | 3369 | e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2); |
3371 | 3370 | ||
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index ccaaee0951cf..f012cc62eff3 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -4149,7 +4149,6 @@ static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
4149 | count = e1000_tx_map(adapter, skb, first, max_per_txd, nr_frags, mss); | 4149 | count = e1000_tx_map(adapter, skb, first, max_per_txd, nr_frags, mss); |
4150 | if (count) { | 4150 | if (count) { |
4151 | e1000_tx_queue(adapter, tx_flags, count); | 4151 | e1000_tx_queue(adapter, tx_flags, count); |
4152 | netdev->trans_start = jiffies; | ||
4153 | /* Make sure there is space in the ring for the next send. */ | 4152 | /* Make sure there is space in the ring for the next send. */ |
4154 | e1000_maybe_stop_tx(netdev, MAX_SKB_FRAGS + 2); | 4153 | e1000_maybe_stop_tx(netdev, MAX_SKB_FRAGS + 2); |
4155 | 4154 | ||
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index 310ee035067c..26151fa35df5 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c | |||
@@ -1163,7 +1163,7 @@ static void hamachi_tx_timeout(struct net_device *dev) | |||
1163 | hmp->rx_ring[RX_RING_SIZE-1].status_n_length |= cpu_to_le32(DescEndRing); | 1163 | hmp->rx_ring[RX_RING_SIZE-1].status_n_length |= cpu_to_le32(DescEndRing); |
1164 | 1164 | ||
1165 | /* Trigger an immediate transmit demand. */ | 1165 | /* Trigger an immediate transmit demand. */ |
1166 | dev->trans_start = jiffies; | 1166 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1167 | hmp->stats.tx_errors++; | 1167 | hmp->stats.tx_errors++; |
1168 | 1168 | ||
1169 | /* Restart the chip's Tx/Rx processes . */ | 1169 | /* Restart the chip's Tx/Rx processes . */ |
@@ -1364,7 +1364,6 @@ static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1364 | hmp->tx_full = 1; | 1364 | hmp->tx_full = 1; |
1365 | netif_stop_queue(dev); | 1365 | netif_stop_queue(dev); |
1366 | } | 1366 | } |
1367 | dev->trans_start = jiffies; | ||
1368 | 1367 | ||
1369 | if (hamachi_debug > 4) { | 1368 | if (hamachi_debug > 4) { |
1370 | printk(KERN_DEBUG "%s: Hamachi transmit frame #%d queued in slot %d.\n", | 1369 | printk(KERN_DEBUG "%s: Hamachi transmit frame #%d queued in slot %d.\n", |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 8e93750d5120..958b2879da48 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -3344,7 +3344,6 @@ static int igb_xmit_frame_ring_adv(struct sk_buff *skb, | |||
3344 | if (count) { | 3344 | if (count) { |
3345 | igb_tx_queue_adv(adapter, tx_ring, tx_flags, count, | 3345 | igb_tx_queue_adv(adapter, tx_ring, tx_flags, count, |
3346 | skb->len, hdr_len); | 3346 | skb->len, hdr_len); |
3347 | netdev->trans_start = jiffies; | ||
3348 | /* Make sure there is space in the ring for the next send. */ | 3347 | /* Make sure there is space in the ring for the next send. */ |
3349 | igb_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 4); | 3348 | igb_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 4); |
3350 | } else { | 3349 | } else { |
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 44a8eef03a74..5f7ba1a4990b 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
@@ -2270,7 +2270,6 @@ static int igbvf_xmit_frame_ring_adv(struct sk_buff *skb, | |||
2270 | if (count) { | 2270 | if (count) { |
2271 | igbvf_tx_queue_adv(adapter, tx_ring, tx_flags, count, | 2271 | igbvf_tx_queue_adv(adapter, tx_ring, tx_flags, count, |
2272 | skb->len, hdr_len); | 2272 | skb->len, hdr_len); |
2273 | netdev->trans_start = jiffies; | ||
2274 | /* Make sure there is space in the ring for the next send. */ | 2273 | /* Make sure there is space in the ring for the next send. */ |
2275 | igbvf_maybe_stop_tx(netdev, MAX_SKB_FRAGS + 4); | 2274 | igbvf_maybe_stop_tx(netdev, MAX_SKB_FRAGS + 4); |
2276 | } else { | 2275 | } else { |
diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 621a7c0c46ba..1e3c63d67b91 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c | |||
@@ -1939,7 +1939,6 @@ jme_start_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
1939 | TXCS_SELECT_QUEUE0 | | 1939 | TXCS_SELECT_QUEUE0 | |
1940 | TXCS_QUEUE0S | | 1940 | TXCS_QUEUE0S | |
1941 | TXCS_ENABLE); | 1941 | TXCS_ENABLE); |
1942 | netdev->trans_start = jiffies; | ||
1943 | 1942 | ||
1944 | tx_dbg(jme, "xmit: %d+%d@%lu\n", idx, | 1943 | tx_dbg(jme, "xmit: %d+%d@%lu\n", idx, |
1945 | skb_shinfo(skb)->nr_frags + 2, | 1944 | skb_shinfo(skb)->nr_frags + 2, |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 0d9de5ac4130..edac3a0b02d6 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -6777,8 +6777,6 @@ static int niu_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6777 | netif_tx_wake_queue(txq); | 6777 | netif_tx_wake_queue(txq); |
6778 | } | 6778 | } |
6779 | 6779 | ||
6780 | dev->trans_start = jiffies; | ||
6781 | |||
6782 | out: | 6780 | out: |
6783 | return NETDEV_TX_OK; | 6781 | return NETDEV_TX_OK; |
6784 | 6782 | ||
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index d531614a90b5..940962ae8f23 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -1204,9 +1204,7 @@ again: | |||
1204 | if (stopped && (dev->tx_done_idx != tx_done_idx) && start_tx_okay(dev)) | 1204 | if (stopped && (dev->tx_done_idx != tx_done_idx) && start_tx_okay(dev)) |
1205 | netif_start_queue(ndev); | 1205 | netif_start_queue(ndev); |
1206 | 1206 | ||
1207 | /* set the transmit start time to catch transmit timeouts */ | 1207 | return NETDEV_TX_OK; |
1208 | ndev->trans_start = jiffies; | ||
1209 | return 0; | ||
1210 | } | 1208 | } |
1211 | 1209 | ||
1212 | static void ns83820_update_stats(struct ns83820 *dev) | 1210 | static void ns83820_update_stats(struct ns83820 *dev) |
@@ -1626,7 +1624,7 @@ static void ns83820_tx_watch(unsigned long data) | |||
1626 | ); | 1624 | ); |
1627 | #endif | 1625 | #endif |
1628 | 1626 | ||
1629 | if (time_after(jiffies, ndev->trans_start + 1*HZ) && | 1627 | if (time_after(jiffies, dev_trans_start(ndev) + 1*HZ) && |
1630 | dev->tx_done_idx != dev->tx_free_idx) { | 1628 | dev->tx_done_idx != dev->tx_free_idx) { |
1631 | printk(KERN_DEBUG "%s: ns83820_tx_watch: %u %u %d\n", | 1629 | printk(KERN_DEBUG "%s: ns83820_tx_watch: %u %u %d\n", |
1632 | ndev->name, | 1630 | ndev->name, |
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index cadc32c94c1e..8a823ecc99a9 100644 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c | |||
@@ -2617,7 +2617,6 @@ static int ql3xxx_send(struct sk_buff *skb, struct net_device *ndev) | |||
2617 | &port_regs->CommonRegs.reqQProducerIndex, | 2617 | &port_regs->CommonRegs.reqQProducerIndex, |
2618 | qdev->req_producer_index); | 2618 | qdev->req_producer_index); |
2619 | 2619 | ||
2620 | ndev->trans_start = jiffies; | ||
2621 | if (netif_msg_tx_queued(qdev)) | 2620 | if (netif_msg_tx_queued(qdev)) |
2622 | printk(KERN_DEBUG PFX "%s: tx queued, slot %d, len %d\n", | 2621 | printk(KERN_DEBUG PFX "%s: tx queued, slot %d, len %d\n", |
2623 | ndev->name, qdev->req_producer_index, skb->len); | 2622 | ndev->name, qdev->req_producer_index, skb->len); |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 0ec0605bcebd..7fa88d2b4c99 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -3279,8 +3279,6 @@ static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3279 | status = opts1 | len | (RingEnd * !((entry + 1) % NUM_TX_DESC)); | 3279 | status = opts1 | len | (RingEnd * !((entry + 1) % NUM_TX_DESC)); |
3280 | txd->opts1 = cpu_to_le32(status); | 3280 | txd->opts1 = cpu_to_le32(status); |
3281 | 3281 | ||
3282 | dev->trans_start = jiffies; | ||
3283 | |||
3284 | tp->cur_tx += frags + 1; | 3282 | tp->cur_tx += frags + 1; |
3285 | 3283 | ||
3286 | smp_wmb(); | 3284 | smp_wmb(); |
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 55ccd51d247e..13b8ca41d571 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
@@ -1204,8 +1204,6 @@ static int sis190_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1204 | 1204 | ||
1205 | SIS_W32(TxControl, 0x1a00 | CmdReset | CmdTxEnb); | 1205 | SIS_W32(TxControl, 0x1a00 | CmdReset | CmdTxEnb); |
1206 | 1206 | ||
1207 | dev->trans_start = jiffies; | ||
1208 | |||
1209 | dirty_tx = tp->dirty_tx; | 1207 | dirty_tx = tp->dirty_tx; |
1210 | if ((tp->cur_tx - NUM_TX_DESC) == dirty_tx) { | 1208 | if ((tp->cur_tx - NUM_TX_DESC) == dirty_tx) { |
1211 | netif_stop_queue(dev); | 1209 | netif_stop_queue(dev); |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index c11cdd08ec57..60d502eef4fc 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -2837,8 +2837,6 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev) | |||
2837 | netif_stop_queue(dev); | 2837 | netif_stop_queue(dev); |
2838 | } | 2838 | } |
2839 | 2839 | ||
2840 | dev->trans_start = jiffies; | ||
2841 | |||
2842 | return NETDEV_TX_OK; | 2840 | return NETDEV_TX_OK; |
2843 | } | 2841 | } |
2844 | 2842 | ||
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index a2ff9cb1e7ac..6b5946fe8ae2 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -1690,7 +1690,6 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev) | |||
1690 | 1690 | ||
1691 | sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod); | 1691 | sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod); |
1692 | 1692 | ||
1693 | dev->trans_start = jiffies; | ||
1694 | return NETDEV_TX_OK; | 1693 | return NETDEV_TX_OK; |
1695 | 1694 | ||
1696 | mapping_unwind: | 1695 | mapping_unwind: |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index eb65e25989f3..a39b534fb43e 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -5194,9 +5194,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
5194 | } | 5194 | } |
5195 | 5195 | ||
5196 | out_unlock: | 5196 | out_unlock: |
5197 | mmiowb(); | 5197 | mmiowb(); |
5198 | |||
5199 | dev->trans_start = jiffies; | ||
5200 | 5198 | ||
5201 | return NETDEV_TX_OK; | 5199 | return NETDEV_TX_OK; |
5202 | } | 5200 | } |
@@ -5407,9 +5405,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) | |||
5407 | } | 5405 | } |
5408 | 5406 | ||
5409 | out_unlock: | 5407 | out_unlock: |
5410 | mmiowb(); | 5408 | mmiowb(); |
5411 | |||
5412 | dev->trans_start = jiffies; | ||
5413 | 5409 | ||
5414 | return NETDEV_TX_OK; | 5410 | return NETDEV_TX_OK; |
5415 | } | 5411 | } |
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c index 7477ffdcddb4..3c7a5053f1da 100644 --- a/drivers/net/yellowfin.c +++ b/drivers/net/yellowfin.c | |||
@@ -717,7 +717,7 @@ static void yellowfin_tx_timeout(struct net_device *dev) | |||
717 | if (yp->cur_tx - yp->dirty_tx < TX_QUEUE_SIZE) | 717 | if (yp->cur_tx - yp->dirty_tx < TX_QUEUE_SIZE) |
718 | netif_wake_queue (dev); /* Typical path */ | 718 | netif_wake_queue (dev); /* Typical path */ |
719 | 719 | ||
720 | dev->trans_start = jiffies; | 720 | dev->trans_start = jiffies; /* prevent tx timeout */ |
721 | dev->stats.tx_errors++; | 721 | dev->stats.tx_errors++; |
722 | } | 722 | } |
723 | 723 | ||
@@ -876,7 +876,6 @@ static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
876 | netif_start_queue (dev); /* Typical path */ | 876 | netif_start_queue (dev); /* Typical path */ |
877 | else | 877 | else |
878 | yp->tx_full = 1; | 878 | yp->tx_full = 1; |
879 | dev->trans_start = jiffies; | ||
880 | 879 | ||
881 | if (yellowfin_debug > 4) { | 880 | if (yellowfin_debug > 4) { |
882 | printk(KERN_DEBUG "%s: Yellowfin transmit frame #%d queued in slot %d.\n", | 881 | printk(KERN_DEBUG "%s: Yellowfin transmit frame #%d queued in slot %d.\n", |