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/eth16i.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/eth16i.c')
-rw-r--r-- | drivers/net/eth16i.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c index d4e24f08b3ba..874973f558e9 100644 --- a/drivers/net/eth16i.c +++ b/drivers/net/eth16i.c | |||
@@ -1027,7 +1027,7 @@ static void eth16i_timeout(struct net_device *dev) | |||
1027 | inw(ioaddr + TX_STATUS_REG), (inb(ioaddr + TX_STATUS_REG) & TX_DONE) ? | 1027 | inw(ioaddr + TX_STATUS_REG), (inb(ioaddr + TX_STATUS_REG) & TX_DONE) ? |
1028 | "IRQ conflict" : "network cable problem"); | 1028 | "IRQ conflict" : "network cable problem"); |
1029 | 1029 | ||
1030 | dev->trans_start = jiffies; | 1030 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1031 | 1031 | ||
1032 | /* Let's dump all registers */ | 1032 | /* Let's dump all registers */ |
1033 | if(eth16i_debug > 0) { | 1033 | if(eth16i_debug > 0) { |
@@ -1047,7 +1047,7 @@ static void eth16i_timeout(struct net_device *dev) | |||
1047 | } | 1047 | } |
1048 | dev->stats.tx_errors++; | 1048 | dev->stats.tx_errors++; |
1049 | eth16i_reset(dev); | 1049 | eth16i_reset(dev); |
1050 | dev->trans_start = jiffies; | 1050 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1051 | outw(ETH16I_INTR_ON, ioaddr + TX_INTR_REG); | 1051 | outw(ETH16I_INTR_ON, ioaddr + TX_INTR_REG); |
1052 | netif_wake_queue(dev); | 1052 | netif_wake_queue(dev); |
1053 | } | 1053 | } |
@@ -1109,7 +1109,6 @@ static netdev_tx_t eth16i_tx(struct sk_buff *skb, struct net_device *dev) | |||
1109 | outb(TX_START | lp->tx_queue, ioaddr + TRANSMIT_START_REG); | 1109 | outb(TX_START | lp->tx_queue, ioaddr + TRANSMIT_START_REG); |
1110 | lp->tx_queue = 0; | 1110 | lp->tx_queue = 0; |
1111 | lp->tx_queue_len = 0; | 1111 | lp->tx_queue_len = 0; |
1112 | dev->trans_start = jiffies; | ||
1113 | lp->tx_started = 1; | 1112 | lp->tx_started = 1; |
1114 | netif_wake_queue(dev); | 1113 | netif_wake_queue(dev); |
1115 | } | 1114 | } |