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/ni65.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/ni65.c')
-rw-r--r-- | drivers/net/ni65.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ni65.c b/drivers/net/ni65.c index 9225c76cac40..da228a0dd6cd 100644 --- a/drivers/net/ni65.c +++ b/drivers/net/ni65.c | |||
@@ -784,7 +784,7 @@ static void ni65_stop_start(struct net_device *dev,struct priv *p) | |||
784 | if(!p->lock) | 784 | if(!p->lock) |
785 | if (p->tmdnum || !p->xmit_queued) | 785 | if (p->tmdnum || !p->xmit_queued) |
786 | netif_wake_queue(dev); | 786 | netif_wake_queue(dev); |
787 | dev->trans_start = jiffies; | 787 | dev->trans_start = jiffies; /* prevent tx timeout */ |
788 | } | 788 | } |
789 | else | 789 | else |
790 | writedatareg(CSR0_STRT | csr0); | 790 | writedatareg(CSR0_STRT | csr0); |
@@ -1150,7 +1150,7 @@ static void ni65_timeout(struct net_device *dev) | |||
1150 | printk("%02x ",p->tmdhead[i].u.s.status); | 1150 | printk("%02x ",p->tmdhead[i].u.s.status); |
1151 | printk("\n"); | 1151 | printk("\n"); |
1152 | ni65_lance_reinit(dev); | 1152 | ni65_lance_reinit(dev); |
1153 | dev->trans_start = jiffies; | 1153 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1154 | netif_wake_queue(dev); | 1154 | netif_wake_queue(dev); |
1155 | } | 1155 | } |
1156 | 1156 | ||
@@ -1213,7 +1213,6 @@ static netdev_tx_t ni65_send_packet(struct sk_buff *skb, | |||
1213 | netif_wake_queue(dev); | 1213 | netif_wake_queue(dev); |
1214 | 1214 | ||
1215 | p->lock = 0; | 1215 | p->lock = 0; |
1216 | dev->trans_start = jiffies; | ||
1217 | 1216 | ||
1218 | spin_unlock_irqrestore(&p->ring_lock, flags); | 1217 | spin_unlock_irqrestore(&p->ring_lock, flags); |
1219 | } | 1218 | } |