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/wan/lmc | |
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/wan/lmc')
-rw-r--r-- | drivers/net/wan/lmc/lmc_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index b2785037712..e2c6f7f4f51 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c | |||
@@ -1506,8 +1506,6 @@ static netdev_tx_t lmc_start_xmit(struct sk_buff *skb, | |||
1506 | /* send now! */ | 1506 | /* send now! */ |
1507 | LMC_CSR_WRITE (sc, csr_txpoll, 0); | 1507 | LMC_CSR_WRITE (sc, csr_txpoll, 0); |
1508 | 1508 | ||
1509 | dev->trans_start = jiffies; | ||
1510 | |||
1511 | spin_unlock_irqrestore(&sc->lmc_lock, flags); | 1509 | spin_unlock_irqrestore(&sc->lmc_lock, flags); |
1512 | 1510 | ||
1513 | lmc_trace(dev, "lmc_start_xmit_out"); | 1511 | lmc_trace(dev, "lmc_start_xmit_out"); |
@@ -2103,7 +2101,7 @@ static void lmc_driver_timeout(struct net_device *dev) | |||
2103 | printk("%s: Xmitter busy|\n", dev->name); | 2101 | printk("%s: Xmitter busy|\n", dev->name); |
2104 | 2102 | ||
2105 | sc->extra_stats.tx_tbusy_calls++; | 2103 | sc->extra_stats.tx_tbusy_calls++; |
2106 | if (jiffies - dev->trans_start < TX_TIMEOUT) | 2104 | if (jiffies - dev_trans_start(dev) < TX_TIMEOUT) |
2107 | goto bug_out; | 2105 | goto bug_out; |
2108 | 2106 | ||
2109 | /* | 2107 | /* |
@@ -2135,7 +2133,7 @@ static void lmc_driver_timeout(struct net_device *dev) | |||
2135 | sc->lmc_device->stats.tx_errors++; | 2133 | sc->lmc_device->stats.tx_errors++; |
2136 | sc->extra_stats.tx_ProcTimeout++; /* -baz */ | 2134 | sc->extra_stats.tx_ProcTimeout++; /* -baz */ |
2137 | 2135 | ||
2138 | dev->trans_start = jiffies; | 2136 | dev->trans_start = jiffies; /* prevent tx timeout */ |
2139 | 2137 | ||
2140 | bug_out: | 2138 | bug_out: |
2141 | 2139 | ||