aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dl2k.c
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 /drivers/net/dl2k.c
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>
Diffstat (limited to 'drivers/net/dl2k.c')
-rw-r--r--drivers/net/dl2k.c8
1 files changed, 3 insertions, 5 deletions
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