aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-05-27 20:00:41 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-29 04:46:27 -0400
commitcdd0db058d64f2619b08e7d098ee0014aa0a5bc1 (patch)
treea5e31f6687eff581309b095781c7e2f0bc676182
parent28679751a924c11f7135641f26e99249385de5b4 (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.c1
-rw-r--r--drivers/net/atl1c/atl1c_main.c1
-rw-r--r--drivers/net/atl1e/atl1e_main.c2
-rw-r--r--drivers/net/atlx/atl1.c1
-rw-r--r--drivers/net/bnx2.c1
-rw-r--r--drivers/net/dl2k.c8
-rw-r--r--drivers/net/e1000/e1000_main.c1
-rw-r--r--drivers/net/e1000e/netdev.c1
-rw-r--r--drivers/net/hamachi.c3
-rw-r--r--drivers/net/igb/igb_main.c1
-rw-r--r--drivers/net/igbvf/netdev.c1
-rw-r--r--drivers/net/jme.c1
-rw-r--r--drivers/net/niu.c2
-rw-r--r--drivers/net/ns83820.c6
-rw-r--r--drivers/net/qla3xxx.c1
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/sis190.c2
-rw-r--r--drivers/net/skge.c2
-rw-r--r--drivers/net/sky2.c1
-rw-r--r--drivers/net/tg3.c8
-rw-r--r--drivers/net/yellowfin.c3
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
2579overflow: 2578overflow:
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
673static irqreturn_t 671static 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);