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/pcmcia/3c574_cs.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/pcmcia/3c574_cs.c')
-rw-r--r-- | drivers/net/pcmcia/3c574_cs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index 757f87bb1db3..b6d9313cec00 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
@@ -739,7 +739,7 @@ static void el3_tx_timeout(struct net_device *dev) | |||
739 | printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name); | 739 | printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name); |
740 | dump_status(dev); | 740 | dump_status(dev); |
741 | dev->stats.tx_errors++; | 741 | dev->stats.tx_errors++; |
742 | dev->trans_start = jiffies; | 742 | dev->trans_start = jiffies; /* prevent tx timeout */ |
743 | /* Issue TX_RESET and TX_START commands. */ | 743 | /* Issue TX_RESET and TX_START commands. */ |
744 | tc574_wait_for_completion(dev, TxReset); | 744 | tc574_wait_for_completion(dev, TxReset); |
745 | outw(TxEnable, ioaddr + EL3_CMD); | 745 | outw(TxEnable, ioaddr + EL3_CMD); |
@@ -790,8 +790,6 @@ static netdev_tx_t el3_start_xmit(struct sk_buff *skb, | |||
790 | /* ... and the packet rounded to a doubleword. */ | 790 | /* ... and the packet rounded to a doubleword. */ |
791 | outsl(ioaddr + TX_FIFO, skb->data, (skb->len+3)>>2); | 791 | outsl(ioaddr + TX_FIFO, skb->data, (skb->len+3)>>2); |
792 | 792 | ||
793 | dev->trans_start = jiffies; | ||
794 | |||
795 | /* TxFree appears only in Window 1, not offset 0x1c. */ | 793 | /* TxFree appears only in Window 1, not offset 0x1c. */ |
796 | if (inw(ioaddr + TxFree) <= 1536) { | 794 | if (inw(ioaddr + TxFree) <= 1536) { |
797 | netif_stop_queue(dev); | 795 | netif_stop_queue(dev); |