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 | |
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>
168 files changed, 103 insertions, 314 deletions
diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c index 3ea42ff17657..4fed2a88243b 100644 --- a/drivers/net/3c501.c +++ b/drivers/net/3c501.c | |||
@@ -480,7 +480,6 @@ static netdev_tx_t el_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
480 | /* fire ... Trigger xmit. */ | 480 | /* fire ... Trigger xmit. */ |
481 | outb(AX_XMIT, AX_CMD); | 481 | outb(AX_XMIT, AX_CMD); |
482 | lp->loading = 0; | 482 | lp->loading = 0; |
483 | dev->trans_start = jiffies; | ||
484 | if (el_debug > 2) | 483 | if (el_debug > 2) |
485 | pr_debug(" queued xmit.\n"); | 484 | pr_debug(" queued xmit.\n"); |
486 | dev_kfree_skb(skb); | 485 | dev_kfree_skb(skb); |
diff --git a/drivers/net/3c505.c b/drivers/net/3c505.c index 8d584f5fd02d..88d766ee0e1b 100644 --- a/drivers/net/3c505.c +++ b/drivers/net/3c505.c | |||
@@ -1055,7 +1055,7 @@ static void elp_timeout(struct net_device *dev) | |||
1055 | (stat & ACRF) ? "interrupt" : "command"); | 1055 | (stat & ACRF) ? "interrupt" : "command"); |
1056 | if (elp_debug >= 1) | 1056 | if (elp_debug >= 1) |
1057 | pr_debug("%s: status %#02x\n", dev->name, stat); | 1057 | pr_debug("%s: status %#02x\n", dev->name, stat); |
1058 | dev->trans_start = jiffies; | 1058 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1059 | dev->stats.tx_dropped++; | 1059 | dev->stats.tx_dropped++; |
1060 | netif_wake_queue(dev); | 1060 | netif_wake_queue(dev); |
1061 | } | 1061 | } |
@@ -1093,11 +1093,6 @@ static netdev_tx_t elp_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1093 | if (elp_debug >= 3) | 1093 | if (elp_debug >= 3) |
1094 | pr_debug("%s: packet of length %d sent\n", dev->name, (int) skb->len); | 1094 | pr_debug("%s: packet of length %d sent\n", dev->name, (int) skb->len); |
1095 | 1095 | ||
1096 | /* | ||
1097 | * start the transmit timeout | ||
1098 | */ | ||
1099 | dev->trans_start = jiffies; | ||
1100 | |||
1101 | prime_rx(dev); | 1096 | prime_rx(dev); |
1102 | spin_unlock_irqrestore(&adapter->lock, flags); | 1097 | spin_unlock_irqrestore(&adapter->lock, flags); |
1103 | netif_start_queue(dev); | 1098 | netif_start_queue(dev); |
diff --git a/drivers/net/3c507.c b/drivers/net/3c507.c index 9e95afa49fbe..c4e272fbc2cc 100644 --- a/drivers/net/3c507.c +++ b/drivers/net/3c507.c | |||
@@ -504,7 +504,7 @@ static void el16_tx_timeout (struct net_device *dev) | |||
504 | outb (0, ioaddr + SIGNAL_CA); /* Issue channel-attn. */ | 504 | outb (0, ioaddr + SIGNAL_CA); /* Issue channel-attn. */ |
505 | lp->last_restart = dev->stats.tx_packets; | 505 | lp->last_restart = dev->stats.tx_packets; |
506 | } | 506 | } |
507 | dev->trans_start = jiffies; | 507 | dev->trans_start = jiffies; /* prevent tx timeout */ |
508 | netif_wake_queue (dev); | 508 | netif_wake_queue (dev); |
509 | } | 509 | } |
510 | 510 | ||
@@ -528,7 +528,6 @@ static netdev_tx_t el16_send_packet (struct sk_buff *skb, | |||
528 | 528 | ||
529 | hardware_send_packet (dev, buf, skb->len, length - skb->len); | 529 | hardware_send_packet (dev, buf, skb->len, length - skb->len); |
530 | 530 | ||
531 | dev->trans_start = jiffies; | ||
532 | /* Enable the 82586 interrupt input. */ | 531 | /* Enable the 82586 interrupt input. */ |
533 | outb (0x84, ioaddr + MISC_CTRL); | 532 | outb (0x84, ioaddr + MISC_CTRL); |
534 | 533 | ||
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index ab9bb3c52002..54deaa91e7c6 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -807,7 +807,7 @@ el3_tx_timeout (struct net_device *dev) | |||
807 | dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS), | 807 | dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS), |
808 | inw(ioaddr + TX_FREE)); | 808 | inw(ioaddr + TX_FREE)); |
809 | dev->stats.tx_errors++; | 809 | dev->stats.tx_errors++; |
810 | dev->trans_start = jiffies; | 810 | dev->trans_start = jiffies; /* prevent tx timeout */ |
811 | /* Issue TX_RESET and TX_START commands. */ | 811 | /* Issue TX_RESET and TX_START commands. */ |
812 | outw(TxReset, ioaddr + EL3_CMD); | 812 | outw(TxReset, ioaddr + EL3_CMD); |
813 | outw(TxEnable, ioaddr + EL3_CMD); | 813 | outw(TxEnable, ioaddr + EL3_CMD); |
@@ -868,7 +868,6 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
868 | /* ... and the packet rounded to a doubleword. */ | 868 | /* ... and the packet rounded to a doubleword. */ |
869 | outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2); | 869 | outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2); |
870 | 870 | ||
871 | dev->trans_start = jiffies; | ||
872 | if (inw(ioaddr + TX_FREE) > 1536) | 871 | if (inw(ioaddr + TX_FREE) > 1536) |
873 | netif_start_queue(dev); | 872 | netif_start_queue(dev); |
874 | else | 873 | else |
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index 2e17837be546..569e269f282e 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c | |||
@@ -992,7 +992,7 @@ static void corkscrew_timeout(struct net_device *dev) | |||
992 | if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress)) | 992 | if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress)) |
993 | break; | 993 | break; |
994 | outw(TxEnable, ioaddr + EL3_CMD); | 994 | outw(TxEnable, ioaddr + EL3_CMD); |
995 | dev->trans_start = jiffies; | 995 | dev->trans_start = jiffies; /* prevent tx timeout */ |
996 | dev->stats.tx_errors++; | 996 | dev->stats.tx_errors++; |
997 | dev->stats.tx_dropped++; | 997 | dev->stats.tx_dropped++; |
998 | netif_wake_queue(dev); | 998 | netif_wake_queue(dev); |
@@ -1055,7 +1055,6 @@ static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb, | |||
1055 | prev_entry->status &= ~0x80000000; | 1055 | prev_entry->status &= ~0x80000000; |
1056 | netif_wake_queue(dev); | 1056 | netif_wake_queue(dev); |
1057 | } | 1057 | } |
1058 | dev->trans_start = jiffies; | ||
1059 | return NETDEV_TX_OK; | 1058 | return NETDEV_TX_OK; |
1060 | } | 1059 | } |
1061 | /* Put out the doubleword header... */ | 1060 | /* Put out the doubleword header... */ |
@@ -1091,7 +1090,6 @@ static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb, | |||
1091 | outw(SetTxThreshold + (1536 >> 2), ioaddr + EL3_CMD); | 1090 | outw(SetTxThreshold + (1536 >> 2), ioaddr + EL3_CMD); |
1092 | #endif /* bus master */ | 1091 | #endif /* bus master */ |
1093 | 1092 | ||
1094 | dev->trans_start = jiffies; | ||
1095 | 1093 | ||
1096 | /* Clear the Tx status stack. */ | 1094 | /* Clear the Tx status stack. */ |
1097 | { | 1095 | { |
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index 55d219e585fb..a7b0e5e43a52 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -1152,7 +1152,6 @@ static netdev_tx_t elmc_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1152 | p->scb->cmd = CUC_START; | 1152 | p->scb->cmd = CUC_START; |
1153 | p->xmit_cmds[0]->cmd_status = 0; | 1153 | p->xmit_cmds[0]->cmd_status = 0; |
1154 | elmc_attn586(); | 1154 | elmc_attn586(); |
1155 | dev->trans_start = jiffies; | ||
1156 | if (!i) { | 1155 | if (!i) { |
1157 | dev_kfree_skb(skb); | 1156 | dev_kfree_skb(skb); |
1158 | } | 1157 | } |
@@ -1176,7 +1175,6 @@ static netdev_tx_t elmc_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1176 | p->xmit_cmds[0]->cmd_status = p->nop_cmds[next_nop]->cmd_status = 0; | 1175 | p->xmit_cmds[0]->cmd_status = p->nop_cmds[next_nop]->cmd_status = 0; |
1177 | 1176 | ||
1178 | p->nop_cmds[p->nop_point]->cmd_link = make16((p->xmit_cmds[0])); | 1177 | p->nop_cmds[p->nop_point]->cmd_link = make16((p->xmit_cmds[0])); |
1179 | dev->trans_start = jiffies; | ||
1180 | p->nop_point = next_nop; | 1178 | p->nop_point = next_nop; |
1181 | dev_kfree_skb(skb); | 1179 | dev_kfree_skb(skb); |
1182 | #endif | 1180 | #endif |
@@ -1190,7 +1188,6 @@ static netdev_tx_t elmc_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1190 | = make16((p->nop_cmds[next_nop])); | 1188 | = make16((p->nop_cmds[next_nop])); |
1191 | p->nop_cmds[next_nop]->cmd_status = 0; | 1189 | p->nop_cmds[next_nop]->cmd_status = 0; |
1192 | p->nop_cmds[p->xmit_count]->cmd_link = make16((p->xmit_cmds[p->xmit_count])); | 1190 | p->nop_cmds[p->xmit_count]->cmd_link = make16((p->xmit_cmds[p->xmit_count])); |
1193 | dev->trans_start = jiffies; | ||
1194 | p->xmit_count = next_nop; | 1191 | p->xmit_count = next_nop; |
1195 | if (p->xmit_count != p->xmit_last) | 1192 | if (p->xmit_count != p->xmit_last) |
1196 | netif_wake_queue(dev); | 1193 | netif_wake_queue(dev); |
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 97525307ed27..dab2afac6ddc 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -1917,7 +1917,7 @@ static void vortex_tx_timeout(struct net_device *dev) | |||
1917 | 1917 | ||
1918 | /* Issue Tx Enable */ | 1918 | /* Issue Tx Enable */ |
1919 | iowrite16(TxEnable, ioaddr + EL3_CMD); | 1919 | iowrite16(TxEnable, ioaddr + EL3_CMD); |
1920 | dev->trans_start = jiffies; | 1920 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1921 | 1921 | ||
1922 | /* Switch to register set 7 for normal use. */ | 1922 | /* Switch to register set 7 for normal use. */ |
1923 | EL3WINDOW(7); | 1923 | EL3WINDOW(7); |
@@ -2063,7 +2063,6 @@ vortex_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2063 | } | 2063 | } |
2064 | } | 2064 | } |
2065 | 2065 | ||
2066 | dev->trans_start = jiffies; | ||
2067 | 2066 | ||
2068 | /* Clear the Tx status stack. */ | 2067 | /* Clear the Tx status stack. */ |
2069 | { | 2068 | { |
@@ -2174,7 +2173,6 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2174 | } | 2173 | } |
2175 | iowrite16(DownUnstall, ioaddr + EL3_CMD); | 2174 | iowrite16(DownUnstall, ioaddr + EL3_CMD); |
2176 | spin_unlock_irqrestore(&vp->lock, flags); | 2175 | spin_unlock_irqrestore(&vp->lock, flags); |
2177 | dev->trans_start = jiffies; | ||
2178 | return NETDEV_TX_OK; | 2176 | return NETDEV_TX_OK; |
2179 | } | 2177 | } |
2180 | 2178 | ||
diff --git a/drivers/net/7990.c b/drivers/net/7990.c index f09e59451495..561d3d582813 100644 --- a/drivers/net/7990.c +++ b/drivers/net/7990.c | |||
@@ -262,7 +262,7 @@ static int lance_reset (struct net_device *dev) | |||
262 | 262 | ||
263 | load_csrs (lp); | 263 | load_csrs (lp); |
264 | lance_init_ring (dev); | 264 | lance_init_ring (dev); |
265 | dev->trans_start = jiffies; | 265 | dev->trans_start = jiffies; /* prevent tx timeout */ |
266 | status = init_restart_lance (lp); | 266 | status = init_restart_lance (lp); |
267 | #ifdef DEBUG_DRIVER | 267 | #ifdef DEBUG_DRIVER |
268 | printk ("Lance restart=%d\n", status); | 268 | printk ("Lance restart=%d\n", status); |
@@ -526,7 +526,7 @@ void lance_tx_timeout(struct net_device *dev) | |||
526 | { | 526 | { |
527 | printk("lance_tx_timeout\n"); | 527 | printk("lance_tx_timeout\n"); |
528 | lance_reset(dev); | 528 | lance_reset(dev); |
529 | dev->trans_start = jiffies; | 529 | dev->trans_start = jiffies; /* prevent tx timeout */ |
530 | netif_wake_queue (dev); | 530 | netif_wake_queue (dev); |
531 | } | 531 | } |
532 | EXPORT_SYMBOL_GPL(lance_tx_timeout); | 532 | EXPORT_SYMBOL_GPL(lance_tx_timeout); |
@@ -574,7 +574,6 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
574 | outs++; | 574 | outs++; |
575 | /* Kick the lance: transmit now */ | 575 | /* Kick the lance: transmit now */ |
576 | WRITERDP(lp, LE_C0_INEA | LE_C0_TDMD); | 576 | WRITERDP(lp, LE_C0_INEA | LE_C0_TDMD); |
577 | dev->trans_start = jiffies; | ||
578 | dev_kfree_skb (skb); | 577 | dev_kfree_skb (skb); |
579 | 578 | ||
580 | spin_lock_irqsave (&lp->devlock, flags); | 579 | spin_lock_irqsave (&lp->devlock, flags); |
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 4e8d11cfe477..cd63b97f3c68 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -882,7 +882,6 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb, | |||
882 | spin_unlock_irqrestore(&cp->lock, intr_flags); | 882 | spin_unlock_irqrestore(&cp->lock, intr_flags); |
883 | 883 | ||
884 | cpw8(TxPoll, NormalTxPoll); | 884 | cpw8(TxPoll, NormalTxPoll); |
885 | dev->trans_start = jiffies; | ||
886 | 885 | ||
887 | return NETDEV_TX_OK; | 886 | return NETDEV_TX_OK; |
888 | } | 887 | } |
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index d0cb372a0f0d..4ba72933f0da 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -1716,8 +1716,6 @@ static netdev_tx_t rtl8139_start_xmit (struct sk_buff *skb, | |||
1716 | RTL_W32_F (TxStatus0 + (entry * sizeof (u32)), | 1716 | RTL_W32_F (TxStatus0 + (entry * sizeof (u32)), |
1717 | tp->tx_flag | max(len, (unsigned int)ETH_ZLEN)); | 1717 | tp->tx_flag | max(len, (unsigned int)ETH_ZLEN)); |
1718 | 1718 | ||
1719 | dev->trans_start = jiffies; | ||
1720 | |||
1721 | tp->cur_tx++; | 1719 | tp->cur_tx++; |
1722 | 1720 | ||
1723 | if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx) | 1721 | if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx) |
diff --git a/drivers/net/82596.c b/drivers/net/82596.c index 97c5fc019cd4..dd8dc15556cb 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c | |||
@@ -1050,7 +1050,7 @@ static void i596_tx_timeout (struct net_device *dev) | |||
1050 | lp->last_restart = dev->stats.tx_packets; | 1050 | lp->last_restart = dev->stats.tx_packets; |
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | dev->trans_start = jiffies; | 1053 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1054 | netif_wake_queue (dev); | 1054 | netif_wake_queue (dev); |
1055 | } | 1055 | } |
1056 | 1056 | ||
@@ -1060,7 +1060,6 @@ static netdev_tx_t i596_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1060 | struct tx_cmd *tx_cmd; | 1060 | struct tx_cmd *tx_cmd; |
1061 | struct i596_tbd *tbd; | 1061 | struct i596_tbd *tbd; |
1062 | short length = skb->len; | 1062 | short length = skb->len; |
1063 | dev->trans_start = jiffies; | ||
1064 | 1063 | ||
1065 | DEB(DEB_STARTTX,printk(KERN_DEBUG "%s: i596_start_xmit(%x,%p) called\n", | 1064 | DEB(DEB_STARTTX,printk(KERN_DEBUG "%s: i596_start_xmit(%x,%p) called\n", |
1066 | dev->name, skb->len, skb->data)); | 1065 | dev->name, skb->len, skb->data)); |
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c index ce0a0b8787d8..ecaa28c6f505 100644 --- a/drivers/net/a2065.c +++ b/drivers/net/a2065.c | |||
@@ -525,7 +525,7 @@ static inline int lance_reset (struct net_device *dev) | |||
525 | load_csrs (lp); | 525 | load_csrs (lp); |
526 | 526 | ||
527 | lance_init_ring (dev); | 527 | lance_init_ring (dev); |
528 | dev->trans_start = jiffies; | 528 | dev->trans_start = jiffies; /* prevent tx timeout */ |
529 | netif_start_queue(dev); | 529 | netif_start_queue(dev); |
530 | 530 | ||
531 | status = init_restart_lance (lp); | 531 | status = init_restart_lance (lp); |
@@ -588,7 +588,6 @@ static netdev_tx_t lance_start_xmit (struct sk_buff *skb, | |||
588 | 588 | ||
589 | /* Kick the lance: transmit now */ | 589 | /* Kick the lance: transmit now */ |
590 | ll->rdp = LE_C0_INEA | LE_C0_TDMD; | 590 | ll->rdp = LE_C0_INEA | LE_C0_TDMD; |
591 | dev->trans_start = jiffies; | ||
592 | dev_kfree_skb (skb); | 591 | dev_kfree_skb (skb); |
593 | 592 | ||
594 | local_irq_restore(flags); | 593 | local_irq_restore(flags); |
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index 97d71a960602..585c25f4b60c 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -1339,8 +1339,6 @@ static netdev_tx_t amd8111e_start_xmit(struct sk_buff *skb, | |||
1339 | writel( VAL1 | TDMD0, lp->mmio + CMD0); | 1339 | writel( VAL1 | TDMD0, lp->mmio + CMD0); |
1340 | writel( VAL2 | RDMD0,lp->mmio + CMD0); | 1340 | writel( VAL2 | RDMD0,lp->mmio + CMD0); |
1341 | 1341 | ||
1342 | dev->trans_start = jiffies; | ||
1343 | |||
1344 | if(amd8111e_tx_queue_avail(lp) < 0){ | 1342 | if(amd8111e_tx_queue_avail(lp) < 0){ |
1345 | netif_stop_queue(dev); | 1343 | netif_stop_queue(dev); |
1346 | } | 1344 | } |
diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c index 6f8d6206b5c4..14e1d952226e 100644 --- a/drivers/net/appletalk/cops.c +++ b/drivers/net/appletalk/cops.c | |||
@@ -866,7 +866,7 @@ static void cops_timeout(struct net_device *dev) | |||
866 | } | 866 | } |
867 | printk(KERN_WARNING "%s: Transmit timed out.\n", dev->name); | 867 | printk(KERN_WARNING "%s: Transmit timed out.\n", dev->name); |
868 | cops_jumpstart(dev); /* Restart the card. */ | 868 | cops_jumpstart(dev); /* Restart the card. */ |
869 | dev->trans_start = jiffies; | 869 | dev->trans_start = jiffies; /* prevent tx timeout */ |
870 | netif_wake_queue(dev); | 870 | netif_wake_queue(dev); |
871 | } | 871 | } |
872 | 872 | ||
@@ -919,9 +919,8 @@ static netdev_tx_t cops_send_packet(struct sk_buff *skb, | |||
919 | /* Done sending packet, update counters and cleanup. */ | 919 | /* Done sending packet, update counters and cleanup. */ |
920 | dev->stats.tx_packets++; | 920 | dev->stats.tx_packets++; |
921 | dev->stats.tx_bytes += skb->len; | 921 | dev->stats.tx_bytes += skb->len; |
922 | dev->trans_start = jiffies; | ||
923 | dev_kfree_skb (skb); | 922 | dev_kfree_skb (skb); |
924 | return NETDEV_TX_OK; | 923 | return NETDEV_TX_OK; |
925 | } | 924 | } |
926 | 925 | ||
927 | /* | 926 | /* |
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index d8f029303754..a746ba272f04 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c | |||
@@ -654,7 +654,6 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb, | |||
654 | } | 654 | } |
655 | } | 655 | } |
656 | retval = NETDEV_TX_OK; | 656 | retval = NETDEV_TX_OK; |
657 | dev->trans_start = jiffies; | ||
658 | lp->next_tx = txbuf; | 657 | lp->next_tx = txbuf; |
659 | } else { | 658 | } else { |
660 | retval = NETDEV_TX_BUSY; | 659 | retval = NETDEV_TX_BUSY; |
diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c index fa1a2354f5f9..705373a5308d 100644 --- a/drivers/net/ariadne.c +++ b/drivers/net/ariadne.c | |||
@@ -676,8 +676,6 @@ static netdev_tx_t ariadne_start_xmit(struct sk_buff *skb, | |||
676 | lance->RAP = CSR0; /* PCnet-ISA Controller Status */ | 676 | lance->RAP = CSR0; /* PCnet-ISA Controller Status */ |
677 | lance->RDP = INEA|TDMD; | 677 | lance->RDP = INEA|TDMD; |
678 | 678 | ||
679 | dev->trans_start = jiffies; | ||
680 | |||
681 | if (lowb(priv->tx_ring[(entry+1) % TX_RING_SIZE]->TMD1) != 0) { | 679 | if (lowb(priv->tx_ring[(entry+1) % TX_RING_SIZE]->TMD1) != 0) { |
682 | netif_stop_queue(dev); | 680 | netif_stop_queue(dev); |
683 | priv->tx_full = 1; | 681 | priv->tx_full = 1; |
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c index a4b5b08276f8..8c496fb1ac9e 100644 --- a/drivers/net/arm/am79c961a.c +++ b/drivers/net/arm/am79c961a.c | |||
@@ -469,7 +469,6 @@ am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev) | |||
469 | 469 | ||
470 | spin_lock_irqsave(&priv->chip_lock, flags); | 470 | spin_lock_irqsave(&priv->chip_lock, flags); |
471 | write_rreg (dev->base_addr, CSR0, CSR0_TDMD|CSR0_IENA); | 471 | write_rreg (dev->base_addr, CSR0, CSR0_TDMD|CSR0_IENA); |
472 | dev->trans_start = jiffies; | ||
473 | spin_unlock_irqrestore(&priv->chip_lock, flags); | 472 | spin_unlock_irqrestore(&priv->chip_lock, flags); |
474 | 473 | ||
475 | /* | 474 | /* |
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c index 0adab30f626b..e07b314ed8fd 100644 --- a/drivers/net/arm/at91_ether.c +++ b/drivers/net/arm/at91_ether.c | |||
@@ -824,7 +824,6 @@ static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
824 | /* Set length of the packet in the Transmit Control register */ | 824 | /* Set length of the packet in the Transmit Control register */ |
825 | at91_emac_write(AT91_EMAC_TCR, skb->len); | 825 | at91_emac_write(AT91_EMAC_TCR, skb->len); |
826 | 826 | ||
827 | dev->trans_start = jiffies; | ||
828 | } else { | 827 | } else { |
829 | printk(KERN_ERR "at91_ether.c: at91ether_start_xmit() called, but device is busy!\n"); | 828 | printk(KERN_ERR "at91_ether.c: at91ether_start_xmit() called, but device is busy!\n"); |
830 | return NETDEV_TX_BUSY; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb) | 829 | return NETDEV_TX_BUSY; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb) |
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index 6995169d285a..c5f6736b7d69 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c | |||
@@ -374,8 +374,6 @@ static int ep93xx_xmit(struct sk_buff *skb, struct net_device *dev) | |||
374 | skb->len, DMA_TO_DEVICE); | 374 | skb->len, DMA_TO_DEVICE); |
375 | dev_kfree_skb(skb); | 375 | dev_kfree_skb(skb); |
376 | 376 | ||
377 | dev->trans_start = jiffies; | ||
378 | |||
379 | spin_lock_irq(&ep->tx_pending_lock); | 377 | spin_lock_irq(&ep->tx_pending_lock); |
380 | ep->tx_pending++; | 378 | ep->tx_pending++; |
381 | if (ep->tx_pending == TX_QUEUE_ENTRIES) | 379 | if (ep->tx_pending == TX_QUEUE_ENTRIES) |
diff --git a/drivers/net/arm/ether1.c b/drivers/net/arm/ether1.c index e47c0d962857..b17ab5153f51 100644 --- a/drivers/net/arm/ether1.c +++ b/drivers/net/arm/ether1.c | |||
@@ -736,7 +736,6 @@ ether1_sendpacket (struct sk_buff *skb, struct net_device *dev) | |||
736 | local_irq_restore(flags); | 736 | local_irq_restore(flags); |
737 | 737 | ||
738 | /* handle transmit */ | 738 | /* handle transmit */ |
739 | dev->trans_start = jiffies; | ||
740 | 739 | ||
741 | /* check to see if we have room for a full sized ether frame */ | 740 | /* check to see if we have room for a full sized ether frame */ |
742 | tmp = priv(dev)->tx_head; | 741 | tmp = priv(dev)->tx_head; |
diff --git a/drivers/net/arm/ether3.c b/drivers/net/arm/ether3.c index d9de9bce2395..1361b7367c28 100644 --- a/drivers/net/arm/ether3.c +++ b/drivers/net/arm/ether3.c | |||
@@ -529,7 +529,6 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev) | |||
529 | return NETDEV_TX_BUSY; /* unable to queue */ | 529 | return NETDEV_TX_BUSY; /* unable to queue */ |
530 | } | 530 | } |
531 | 531 | ||
532 | dev->trans_start = jiffies; | ||
533 | ptr = 0x600 * priv(dev)->tx_head; | 532 | ptr = 0x600 * priv(dev)->tx_head; |
534 | priv(dev)->tx_head = next_ptr; | 533 | priv(dev)->tx_head = next_ptr; |
535 | next_ptr *= 0x600; | 534 | next_ptr *= 0x600; |
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 7800d7dfd299..24df0325090c 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -708,7 +708,6 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
708 | /* NPE firmware pads short frames with zeros internally */ | 708 | /* NPE firmware pads short frames with zeros internally */ |
709 | wmb(); | 709 | wmb(); |
710 | queue_put_desc(TX_QUEUE(port->id), tx_desc_phys(port, n), desc); | 710 | queue_put_desc(TX_QUEUE(port->id), tx_desc_phys(port, n), desc); |
711 | dev->trans_start = jiffies; | ||
712 | 711 | ||
713 | if (qmgr_stat_below_low_watermark(txreadyq)) { /* empty */ | 712 | if (qmgr_stat_below_low_watermark(txreadyq)) { /* empty */ |
714 | #if DEBUG_TX | 713 | #if DEBUG_TX |
diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c index 6404704f7eac..54c6d849cf25 100644 --- a/drivers/net/arm/ks8695net.c +++ b/drivers/net/arm/ks8695net.c | |||
@@ -1302,8 +1302,6 @@ ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
1302 | if (++ksp->tx_ring_used == MAX_TX_DESC) | 1302 | if (++ksp->tx_ring_used == MAX_TX_DESC) |
1303 | netif_stop_queue(ndev); | 1303 | netif_stop_queue(ndev); |
1304 | 1304 | ||
1305 | ndev->trans_start = jiffies; | ||
1306 | |||
1307 | /* Kick the TX DMA in case it decided to go IDLE */ | 1305 | /* Kick the TX DMA in case it decided to go IDLE */ |
1308 | ks8695_writereg(ksp, KS8695_DTSC, 0); | 1306 | ks8695_writereg(ksp, KS8695_DTSC, 0); |
1309 | 1307 | ||
diff --git a/drivers/net/arm/w90p910_ether.c b/drivers/net/arm/w90p910_ether.c index 2491934b73e8..2e852463382b 100644 --- a/drivers/net/arm/w90p910_ether.c +++ b/drivers/net/arm/w90p910_ether.c | |||
@@ -483,7 +483,7 @@ static void w90p910_reset_mac(struct net_device *dev) | |||
483 | 483 | ||
484 | w90p910_init_desc(dev); | 484 | w90p910_init_desc(dev); |
485 | 485 | ||
486 | dev->trans_start = jiffies; | 486 | dev->trans_start = jiffies; /* prevent tx timeout */ |
487 | ether->cur_tx = 0x0; | 487 | ether->cur_tx = 0x0; |
488 | ether->finish_tx = 0x0; | 488 | ether->finish_tx = 0x0; |
489 | ether->cur_rx = 0x0; | 489 | ether->cur_rx = 0x0; |
@@ -497,7 +497,7 @@ static void w90p910_reset_mac(struct net_device *dev) | |||
497 | w90p910_trigger_tx(dev); | 497 | w90p910_trigger_tx(dev); |
498 | w90p910_trigger_rx(dev); | 498 | w90p910_trigger_rx(dev); |
499 | 499 | ||
500 | dev->trans_start = jiffies; | 500 | dev->trans_start = jiffies; /* prevent tx timeout */ |
501 | 501 | ||
502 | if (netif_queue_stopped(dev)) | 502 | if (netif_queue_stopped(dev)) |
503 | netif_wake_queue(dev); | 503 | netif_wake_queue(dev); |
@@ -634,8 +634,6 @@ static int w90p910_send_frame(struct net_device *dev, | |||
634 | 634 | ||
635 | txbd = ðer->tdesc->desclist[ether->cur_tx]; | 635 | txbd = ðer->tdesc->desclist[ether->cur_tx]; |
636 | 636 | ||
637 | dev->trans_start = jiffies; | ||
638 | |||
639 | if (txbd->mode & TX_OWEN_DMA) | 637 | if (txbd->mode & TX_OWEN_DMA) |
640 | netif_stop_queue(dev); | 638 | netif_stop_queue(dev); |
641 | 639 | ||
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index 332f9806b78e..861f07a775fb 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c | |||
@@ -583,7 +583,7 @@ static void net_tx_timeout (struct net_device *dev) | |||
583 | outb (0x00, ioaddr + TX_START); | 583 | outb (0x00, ioaddr + TX_START); |
584 | outb (0x03, ioaddr + COL16CNTL); | 584 | outb (0x03, ioaddr + COL16CNTL); |
585 | 585 | ||
586 | dev->trans_start = jiffies; | 586 | dev->trans_start = jiffies; /* prevent tx timeout */ |
587 | 587 | ||
588 | lp->tx_started = 0; | 588 | lp->tx_started = 0; |
589 | lp->tx_queue_ready = 1; | 589 | lp->tx_queue_ready = 1; |
@@ -636,7 +636,6 @@ static netdev_tx_t net_send_packet (struct sk_buff *skb, | |||
636 | outb (0x80 | lp->tx_queue, ioaddr + TX_START); | 636 | outb (0x80 | lp->tx_queue, ioaddr + TX_START); |
637 | lp->tx_queue = 0; | 637 | lp->tx_queue = 0; |
638 | lp->tx_queue_len = 0; | 638 | lp->tx_queue_len = 0; |
639 | dev->trans_start = jiffies; | ||
640 | lp->tx_started = 1; | 639 | lp->tx_started = 1; |
641 | netif_start_queue (dev); | 640 | netif_start_queue (dev); |
642 | } else if (lp->tx_queue_len < 4096 - 1502) | 641 | } else if (lp->tx_queue_len < 4096 - 1502) |
diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c index a8686bfec7a1..b57d7dee389a 100644 --- a/drivers/net/atarilance.c +++ b/drivers/net/atarilance.c | |||
@@ -767,8 +767,8 @@ static void lance_tx_timeout (struct net_device *dev) | |||
767 | /* lance_restart, essentially */ | 767 | /* lance_restart, essentially */ |
768 | lance_init_ring(dev); | 768 | lance_init_ring(dev); |
769 | REGA( CSR0 ) = CSR0_INEA | CSR0_INIT | CSR0_STRT; | 769 | REGA( CSR0 ) = CSR0_INEA | CSR0_INIT | CSR0_STRT; |
770 | dev->trans_start = jiffies; | 770 | dev->trans_start = jiffies; /* prevent tx timeout */ |
771 | netif_wake_queue (dev); | 771 | netif_wake_queue(dev); |
772 | } | 772 | } |
773 | 773 | ||
774 | /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ | 774 | /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ |
@@ -836,7 +836,6 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) | |||
836 | 836 | ||
837 | /* Trigger an immediate send poll. */ | 837 | /* Trigger an immediate send poll. */ |
838 | DREG = CSR0_INEA | CSR0_TDMD; | 838 | DREG = CSR0_INEA | CSR0_TDMD; |
839 | dev->trans_start = jiffies; | ||
840 | 839 | ||
841 | if ((MEM->tx_head[(entry+1) & TX_RING_MOD_MASK].flag & TMD1_OWN) == | 840 | if ((MEM->tx_head[(entry+1) & TX_RING_MOD_MASK].flag & TMD1_OWN) == |
842 | TMD1_OWN_HOST) | 841 | TMD1_OWN_HOST) |
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index fee9cf6a5bd4..8da87383fb39 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c | |||
@@ -892,7 +892,6 @@ static netdev_tx_t atl2_xmit_frame(struct sk_buff *skb, | |||
892 | (adapter->txd_write_ptr >> 2)); | 892 | (adapter->txd_write_ptr >> 2)); |
893 | 893 | ||
894 | mmiowb(); | 894 | mmiowb(); |
895 | netdev->trans_start = jiffies; | ||
896 | dev_kfree_skb_any(skb); | 895 | dev_kfree_skb_any(skb); |
897 | return NETDEV_TX_OK; | 896 | return NETDEV_TX_OK; |
898 | } | 897 | } |
diff --git a/drivers/net/atp.c b/drivers/net/atp.c index 2bd1a5c0ec17..75ff0c59e9c7 100644 --- a/drivers/net/atp.c +++ b/drivers/net/atp.c | |||
@@ -547,7 +547,7 @@ static void tx_timeout(struct net_device *dev) | |||
547 | dev->stats.tx_errors++; | 547 | dev->stats.tx_errors++; |
548 | /* Try to restart the adapter. */ | 548 | /* Try to restart the adapter. */ |
549 | hardware_init(dev); | 549 | hardware_init(dev); |
550 | dev->trans_start = jiffies; | 550 | dev->trans_start = jiffies; /* prevent tx timeout */ |
551 | netif_wake_queue(dev); | 551 | netif_wake_queue(dev); |
552 | dev->stats.tx_errors++; | 552 | dev->stats.tx_errors++; |
553 | } | 553 | } |
@@ -586,7 +586,6 @@ static netdev_tx_t atp_send_packet(struct sk_buff *skb, | |||
586 | write_reg(ioaddr, IMR, ISR_RxOK | ISR_TxErr | ISR_TxOK); | 586 | write_reg(ioaddr, IMR, ISR_RxOK | ISR_TxErr | ISR_TxOK); |
587 | write_reg_high(ioaddr, IMR, ISRh_RxErr); | 587 | write_reg_high(ioaddr, IMR, ISRh_RxErr); |
588 | 588 | ||
589 | dev->trans_start = jiffies; | ||
590 | dev_kfree_skb (skb); | 589 | dev_kfree_skb (skb); |
591 | return NETDEV_TX_OK; | 590 | return NETDEV_TX_OK; |
592 | } | 591 | } |
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 7abb2c84ba5d..ece6128bef14 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -924,7 +924,6 @@ static netdev_tx_t au1000_tx(struct sk_buff *skb, struct net_device *dev) | |||
924 | au_sync(); | 924 | au_sync(); |
925 | dev_kfree_skb(skb); | 925 | dev_kfree_skb(skb); |
926 | aup->tx_head = (aup->tx_head + 1) & (NUM_TX_DMA - 1); | 926 | aup->tx_head = (aup->tx_head + 1) & (NUM_TX_DMA - 1); |
927 | dev->trans_start = jiffies; | ||
928 | return NETDEV_TX_OK; | 927 | return NETDEV_TX_OK; |
929 | } | 928 | } |
930 | 929 | ||
@@ -937,7 +936,7 @@ static void au1000_tx_timeout(struct net_device *dev) | |||
937 | netdev_err(dev, "au1000_tx_timeout: dev=%p\n", dev); | 936 | netdev_err(dev, "au1000_tx_timeout: dev=%p\n", dev); |
938 | au1000_reset_mac(dev); | 937 | au1000_reset_mac(dev); |
939 | au1000_init(dev); | 938 | au1000_init(dev); |
940 | dev->trans_start = jiffies; | 939 | dev->trans_start = jiffies; /* prevent tx timeout */ |
941 | netif_wake_queue(dev); | 940 | netif_wake_queue(dev); |
942 | } | 941 | } |
943 | 942 | ||
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 458272196997..293f9c16e786 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -1014,8 +1014,6 @@ static netdev_tx_t b44_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1014 | if (TX_BUFFS_AVAIL(bp) < 1) | 1014 | if (TX_BUFFS_AVAIL(bp) < 1) |
1015 | netif_stop_queue(dev); | 1015 | netif_stop_queue(dev); |
1016 | 1016 | ||
1017 | dev->trans_start = jiffies; | ||
1018 | |||
1019 | out_unlock: | 1017 | out_unlock: |
1020 | spin_unlock_irqrestore(&bp->lock, flags); | 1018 | spin_unlock_irqrestore(&bp->lock, flags); |
1021 | 1019 | ||
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c index f48ba80025a2..faf5add894d7 100644 --- a/drivers/net/bcm63xx_enet.c +++ b/drivers/net/bcm63xx_enet.c | |||
@@ -565,7 +565,6 @@ static int bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
565 | 565 | ||
566 | priv->stats.tx_bytes += skb->len; | 566 | priv->stats.tx_bytes += skb->len; |
567 | priv->stats.tx_packets++; | 567 | priv->stats.tx_packets++; |
568 | dev->trans_start = jiffies; | ||
569 | ret = NETDEV_TX_OK; | 568 | ret = NETDEV_TX_OK; |
570 | 569 | ||
571 | out_unlock: | 570 | out_unlock: |
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index c488cea8f455..b0207f01eb6b 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -654,7 +654,6 @@ static int bfin_mac_hard_start_xmit(struct sk_buff *skb, | |||
654 | out: | 654 | out: |
655 | adjust_tx_list(); | 655 | adjust_tx_list(); |
656 | current_tx_ptr = current_tx_ptr->next; | 656 | current_tx_ptr = current_tx_ptr->next; |
657 | dev->trans_start = jiffies; | ||
658 | dev->stats.tx_packets++; | 657 | dev->stats.tx_packets++; |
659 | dev->stats.tx_bytes += (skb->len); | 658 | dev->stats.tx_bytes += (skb->len); |
660 | return NETDEV_TX_OK; | 659 | return NETDEV_TX_OK; |
@@ -805,7 +804,7 @@ static void bfin_mac_timeout(struct net_device *dev) | |||
805 | bfin_mac_enable(); | 804 | bfin_mac_enable(); |
806 | 805 | ||
807 | /* We can accept TX packets again */ | 806 | /* We can accept TX packets again */ |
808 | dev->trans_start = jiffies; | 807 | dev->trans_start = jiffies; /* prevent tx timeout */ |
809 | netif_wake_queue(dev); | 808 | netif_wake_queue(dev); |
810 | } | 809 | } |
811 | 810 | ||
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c index 5f983487d6e4..2d8bd86bc5e2 100644 --- a/drivers/net/can/at91_can.c +++ b/drivers/net/can/at91_can.c | |||
@@ -375,7 +375,6 @@ static netdev_tx_t at91_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
375 | at91_write(priv, AT91_MCR(mb), reg_mcr); | 375 | at91_write(priv, AT91_MCR(mb), reg_mcr); |
376 | 376 | ||
377 | stats->tx_bytes += cf->can_dlc; | 377 | stats->tx_bytes += cf->can_dlc; |
378 | dev->trans_start = jiffies; | ||
379 | 378 | ||
380 | /* _NOTE_: substract AT91_MB_TX_FIRST offset from mb! */ | 379 | /* _NOTE_: substract AT91_MB_TX_FIRST offset from mb! */ |
381 | can_put_echo_skb(skb, dev, mb - AT91_MB_TX_FIRST); | 380 | can_put_echo_skb(skb, dev, mb - AT91_MB_TX_FIRST); |
diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c index d77264ad326d..b6e890d28366 100644 --- a/drivers/net/can/bfin_can.c +++ b/drivers/net/can/bfin_can.c | |||
@@ -269,8 +269,6 @@ static int bfin_can_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
269 | /* fill data length code */ | 269 | /* fill data length code */ |
270 | bfin_write16(®->chl[TRANSMIT_CHL].dlc, dlc); | 270 | bfin_write16(®->chl[TRANSMIT_CHL].dlc, dlc); |
271 | 271 | ||
272 | dev->trans_start = jiffies; | ||
273 | |||
274 | can_put_echo_skb(skb, dev, 0); | 272 | can_put_echo_skb(skb, dev, 0); |
275 | 273 | ||
276 | /* set transmit request */ | 274 | /* set transmit request */ |
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c index 8431eb08075d..b11a0cb5ed81 100644 --- a/drivers/net/can/mcp251x.c +++ b/drivers/net/can/mcp251x.c | |||
@@ -475,7 +475,6 @@ static netdev_tx_t mcp251x_hard_start_xmit(struct sk_buff *skb, | |||
475 | 475 | ||
476 | netif_stop_queue(net); | 476 | netif_stop_queue(net); |
477 | priv->tx_skb = skb; | 477 | priv->tx_skb = skb; |
478 | net->trans_start = jiffies; | ||
479 | queue_work(priv->wq, &priv->tx_work); | 478 | queue_work(priv->wq, &priv->tx_work); |
480 | 479 | ||
481 | return NETDEV_TX_OK; | 480 | return NETDEV_TX_OK; |
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index 618c11222abc..24b58619f7c1 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c | |||
@@ -292,8 +292,6 @@ static netdev_tx_t sja1000_start_xmit(struct sk_buff *skb, | |||
292 | for (i = 0; i < dlc; i++) | 292 | for (i = 0; i < dlc; i++) |
293 | priv->write_reg(priv, dreg++, cf->data[i]); | 293 | priv->write_reg(priv, dreg++, cf->data[i]); |
294 | 294 | ||
295 | dev->trans_start = jiffies; | ||
296 | |||
297 | can_put_echo_skb(skb, dev, 0); | 295 | can_put_echo_skb(skb, dev, 0); |
298 | 296 | ||
299 | priv->write_reg(priv, REG_CMR, CMD_TR); | 297 | priv->write_reg(priv, REG_CMR, CMD_TR); |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index bd857a20a755..6d76236ea069 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -2889,7 +2889,6 @@ static netdev_tx_t cas_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2889 | */ | 2889 | */ |
2890 | if (cas_xmit_tx_ringN(cp, ring++ & N_TX_RINGS_MASK, skb)) | 2890 | if (cas_xmit_tx_ringN(cp, ring++ & N_TX_RINGS_MASK, skb)) |
2891 | return NETDEV_TX_BUSY; | 2891 | return NETDEV_TX_BUSY; |
2892 | dev->trans_start = jiffies; | ||
2893 | return NETDEV_TX_OK; | 2892 | return NETDEV_TX_OK; |
2894 | } | 2893 | } |
2895 | 2894 | ||
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index bdfff784645c..3c58db595285 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c | |||
@@ -579,7 +579,6 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
579 | } | 579 | } |
580 | 580 | ||
581 | spin_lock(&priv->lock); | 581 | spin_lock(&priv->lock); |
582 | dev->trans_start = jiffies; | ||
583 | spin_unlock(&priv->lock); | 582 | spin_unlock(&priv->lock); |
584 | desc->dataflags = CPMAC_SOP | CPMAC_EOP | CPMAC_OWN; | 583 | desc->dataflags = CPMAC_SOP | CPMAC_EOP | CPMAC_OWN; |
585 | desc->skb = skb; | 584 | desc->skb = skb; |
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index f49ad8ed9b07..7e00027b9f8e 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c | |||
@@ -1108,7 +1108,7 @@ e100_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1108 | 1108 | ||
1109 | myNextTxDesc->skb = skb; | 1109 | myNextTxDesc->skb = skb; |
1110 | 1110 | ||
1111 | dev->trans_start = jiffies; | 1111 | dev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */ |
1112 | 1112 | ||
1113 | e100_hardware_send_packet(np, buf, skb->len); | 1113 | e100_hardware_send_packet(np, buf, skb->len); |
1114 | 1114 | ||
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 4c38491b8efb..2281ebcb400b 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -1554,7 +1554,6 @@ static netdev_tx_t net_send_packet(struct sk_buff *skb,struct net_device *dev) | |||
1554 | writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1); | 1554 | writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1); |
1555 | spin_unlock_irqrestore(&lp->lock, flags); | 1555 | spin_unlock_irqrestore(&lp->lock, flags); |
1556 | lp->stats.tx_bytes += skb->len; | 1556 | lp->stats.tx_bytes += skb->len; |
1557 | dev->trans_start = jiffies; | ||
1558 | dev_kfree_skb (skb); | 1557 | dev_kfree_skb (skb); |
1559 | 1558 | ||
1560 | /* | 1559 | /* |
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 1f9df5c6a75a..08e82b1a0b33 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c | |||
@@ -1468,7 +1468,6 @@ static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
1468 | tx_buf.length = skb->len; | 1468 | tx_buf.length = skb->len; |
1469 | tx_buf.buf_token = (void *)skb; | 1469 | tx_buf.buf_token = (void *)skb; |
1470 | tx_buf.data_ptr = skb->data; | 1470 | tx_buf.data_ptr = skb->data; |
1471 | ndev->trans_start = jiffies; | ||
1472 | ret_code = emac_send(priv, &tx_packet, EMAC_DEF_TX_CH); | 1471 | ret_code = emac_send(priv, &tx_packet, EMAC_DEF_TX_CH); |
1473 | if (unlikely(ret_code != 0)) { | 1472 | if (unlikely(ret_code != 0)) { |
1474 | if (ret_code == EMAC_ERR_TX_OUT_OF_BD) { | 1473 | if (ret_code == EMAC_ERR_TX_OUT_OF_BD) { |
diff --git a/drivers/net/de600.c b/drivers/net/de600.c index 6b13f4fd2e96..23a65398d011 100644 --- a/drivers/net/de600.c +++ b/drivers/net/de600.c | |||
@@ -166,8 +166,8 @@ static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
166 | int i; | 166 | int i; |
167 | 167 | ||
168 | if (free_tx_pages <= 0) { /* Do timeouts, to avoid hangs. */ | 168 | if (free_tx_pages <= 0) { /* Do timeouts, to avoid hangs. */ |
169 | tickssofar = jiffies - dev->trans_start; | 169 | tickssofar = jiffies - dev_trans_start(dev); |
170 | if (tickssofar < 5) | 170 | if (tickssofar < HZ/20) |
171 | return NETDEV_TX_BUSY; | 171 | return NETDEV_TX_BUSY; |
172 | /* else */ | 172 | /* else */ |
173 | printk(KERN_WARNING "%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem"); | 173 | printk(KERN_WARNING "%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem"); |
diff --git a/drivers/net/de620.c b/drivers/net/de620.c index a0a6830b5e6d..f3650fd096f4 100644 --- a/drivers/net/de620.c +++ b/drivers/net/de620.c | |||
@@ -535,7 +535,6 @@ static int de620_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
535 | } | 535 | } |
536 | de620_write_block(dev, buffer, skb->len, len-skb->len); | 536 | de620_write_block(dev, buffer, skb->len, len-skb->len); |
537 | 537 | ||
538 | dev->trans_start = jiffies; | ||
539 | if(!(using_txbuf == (TXBF0 | TXBF1))) | 538 | if(!(using_txbuf == (TXBF0 | TXBF1))) |
540 | netif_wake_queue(dev); | 539 | netif_wake_queue(dev); |
541 | 540 | ||
diff --git a/drivers/net/declance.c b/drivers/net/declance.c index fb3f0984c289..74abe195212c 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c | |||
@@ -874,7 +874,7 @@ static inline int lance_reset(struct net_device *dev) | |||
874 | 874 | ||
875 | lance_init_ring(dev); | 875 | lance_init_ring(dev); |
876 | load_csrs(lp); | 876 | load_csrs(lp); |
877 | dev->trans_start = jiffies; | 877 | dev->trans_start = jiffies; /* prevent tx timeout */ |
878 | status = init_restart_lance(lp); | 878 | status = init_restart_lance(lp); |
879 | return status; | 879 | return status; |
880 | } | 880 | } |
@@ -930,7 +930,6 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
930 | 930 | ||
931 | spin_unlock_irqrestore(&lp->lock, flags); | 931 | spin_unlock_irqrestore(&lp->lock, flags); |
932 | 932 | ||
933 | dev->trans_start = jiffies; | ||
934 | dev_kfree_skb(skb); | 933 | dev_kfree_skb(skb); |
935 | 934 | ||
936 | return NETDEV_TX_OK; | 935 | return NETDEV_TX_OK; |
diff --git a/drivers/net/depca.c b/drivers/net/depca.c index a88300a0d1e8..38d4d9eefbdd 100644 --- a/drivers/net/depca.c +++ b/drivers/net/depca.c | |||
@@ -921,7 +921,7 @@ static void depca_tx_timeout(struct net_device *dev) | |||
921 | STOP_DEPCA; | 921 | STOP_DEPCA; |
922 | depca_init_ring(dev); | 922 | depca_init_ring(dev); |
923 | LoadCSRs(dev); | 923 | LoadCSRs(dev); |
924 | dev->trans_start = jiffies; | 924 | dev->trans_start = jiffies; /* prevent tx timeout */ |
925 | netif_wake_queue(dev); | 925 | netif_wake_queue(dev); |
926 | InitRestartDepca(dev); | 926 | InitRestartDepca(dev); |
927 | } | 927 | } |
@@ -954,7 +954,6 @@ static netdev_tx_t depca_start_xmit(struct sk_buff *skb, | |||
954 | outw(CSR0, DEPCA_ADDR); | 954 | outw(CSR0, DEPCA_ADDR); |
955 | outw(INEA | TDMD, DEPCA_DATA); | 955 | outw(INEA | TDMD, DEPCA_DATA); |
956 | 956 | ||
957 | dev->trans_start = jiffies; | ||
958 | dev_kfree_skb(skb); | 957 | dev_kfree_skb(skb); |
959 | } | 958 | } |
960 | if (TX_BUFFS_AVAIL) | 959 | if (TX_BUFFS_AVAIL) |
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index a818ea998bbe..254b6f724c60 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -769,7 +769,7 @@ dm9000_hash_table(struct net_device *dev) | |||
769 | } | 769 | } |
770 | 770 | ||
771 | /* | 771 | /* |
772 | * Initilize dm9000 board | 772 | * Initialize dm9000 board |
773 | */ | 773 | */ |
774 | static void | 774 | static void |
775 | dm9000_init_dm9000(struct net_device *dev) | 775 | dm9000_init_dm9000(struct net_device *dev) |
@@ -825,7 +825,7 @@ dm9000_init_dm9000(struct net_device *dev) | |||
825 | /* Init Driver variable */ | 825 | /* Init Driver variable */ |
826 | db->tx_pkt_cnt = 0; | 826 | db->tx_pkt_cnt = 0; |
827 | db->queue_pkt_len = 0; | 827 | db->queue_pkt_len = 0; |
828 | dev->trans_start = 0; | 828 | dev->trans_start = jiffies; |
829 | } | 829 | } |
830 | 830 | ||
831 | /* Our watchdog timed out. Called by the networking layer */ | 831 | /* Our watchdog timed out. Called by the networking layer */ |
@@ -843,7 +843,7 @@ static void dm9000_timeout(struct net_device *dev) | |||
843 | dm9000_reset(db); | 843 | dm9000_reset(db); |
844 | dm9000_init_dm9000(dev); | 844 | dm9000_init_dm9000(dev); |
845 | /* We can accept TX packets again */ | 845 | /* We can accept TX packets again */ |
846 | dev->trans_start = jiffies; | 846 | dev->trans_start = jiffies; /* prevent tx timeout */ |
847 | netif_wake_queue(dev); | 847 | netif_wake_queue(dev); |
848 | 848 | ||
849 | /* Restore previous register address */ | 849 | /* Restore previous register address */ |
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c index d51a83e69585..8b0f50bbf3e5 100644 --- a/drivers/net/dnet.c +++ b/drivers/net/dnet.c | |||
@@ -594,8 +594,6 @@ static netdev_tx_t dnet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
594 | 594 | ||
595 | spin_unlock_irqrestore(&bp->lock, flags); | 595 | spin_unlock_irqrestore(&bp->lock, flags); |
596 | 596 | ||
597 | dev->trans_start = jiffies; | ||
598 | |||
599 | return NETDEV_TX_OK; | 597 | return NETDEV_TX_OK; |
600 | } | 598 | } |
601 | 599 | ||
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index ef97bfcef9dd..b194bad29ace 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -1764,7 +1764,6 @@ static netdev_tx_t e100_xmit_frame(struct sk_buff *skb, | |||
1764 | return NETDEV_TX_BUSY; | 1764 | return NETDEV_TX_BUSY; |
1765 | } | 1765 | } |
1766 | 1766 | ||
1767 | netdev->trans_start = jiffies; | ||
1768 | return NETDEV_TX_OK; | 1767 | return NETDEV_TX_OK; |
1769 | } | 1768 | } |
1770 | 1769 | ||
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index eed65d821e47..8d97f168f018 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c | |||
@@ -1161,8 +1161,7 @@ static netdev_tx_t eepro_send_packet(struct sk_buff *skb, | |||
1161 | /* we won't wake queue here because we're out of space */ | 1161 | /* we won't wake queue here because we're out of space */ |
1162 | dev->stats.tx_dropped++; | 1162 | dev->stats.tx_dropped++; |
1163 | else { | 1163 | else { |
1164 | dev->stats.tx_bytes+=skb->len; | 1164 | dev->stats.tx_bytes+=skb->len; |
1165 | dev->trans_start = jiffies; | ||
1166 | netif_wake_queue(dev); | 1165 | netif_wake_queue(dev); |
1167 | } | 1166 | } |
1168 | 1167 | ||
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c index c31dd0685553..43c9c9c5cf4c 100644 --- a/drivers/net/eexpress.c +++ b/drivers/net/eexpress.c | |||
@@ -543,7 +543,7 @@ static void unstick_cu(struct net_device *dev) | |||
543 | 543 | ||
544 | if (lp->started) | 544 | if (lp->started) |
545 | { | 545 | { |
546 | if (time_after(jiffies, dev->trans_start + 50)) | 546 | if (time_after(jiffies, dev_trans_start(dev) + HZ/2)) |
547 | { | 547 | { |
548 | if (lp->tx_link==lp->last_tx_restart) | 548 | if (lp->tx_link==lp->last_tx_restart) |
549 | { | 549 | { |
@@ -1018,7 +1018,7 @@ static void eexp_hw_tx_pio(struct net_device *dev, unsigned short *buf, | |||
1018 | outw(lp->tx_head+0x16, ioaddr + DATAPORT); | 1018 | outw(lp->tx_head+0x16, ioaddr + DATAPORT); |
1019 | outw(0, ioaddr + DATAPORT); | 1019 | outw(0, ioaddr + DATAPORT); |
1020 | 1020 | ||
1021 | outsw(ioaddr + DATAPORT, buf, (len+1)>>1); | 1021 | outsw(ioaddr + DATAPORT, buf, (len+1)>>1); |
1022 | 1022 | ||
1023 | outw(lp->tx_tail+0xc, ioaddr + WRITE_PTR); | 1023 | outw(lp->tx_tail+0xc, ioaddr + WRITE_PTR); |
1024 | outw(lp->tx_head, ioaddr + DATAPORT); | 1024 | outw(lp->tx_head, ioaddr + DATAPORT); |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 39774817c3eb..33a41e29ec83 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -2241,7 +2241,7 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2241 | } | 2241 | } |
2242 | spin_unlock_irqrestore(&pr->netif_queue, flags); | 2242 | spin_unlock_irqrestore(&pr->netif_queue, flags); |
2243 | } | 2243 | } |
2244 | dev->trans_start = jiffies; | 2244 | dev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */ |
2245 | spin_unlock(&pr->xmit_lock); | 2245 | spin_unlock(&pr->xmit_lock); |
2246 | 2246 | ||
2247 | return NETDEV_TX_OK; | 2247 | return NETDEV_TX_OK; |
diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index ff27f728fd9d..112c5aa9af7f 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c | |||
@@ -1293,8 +1293,6 @@ static netdev_tx_t enc28j60_send_packet(struct sk_buff *skb, | |||
1293 | */ | 1293 | */ |
1294 | netif_stop_queue(dev); | 1294 | netif_stop_queue(dev); |
1295 | 1295 | ||
1296 | /* save the timestamp */ | ||
1297 | priv->netdev->trans_start = jiffies; | ||
1298 | /* Remember the skb for deferred processing */ | 1296 | /* Remember the skb for deferred processing */ |
1299 | priv->tx_skb = skb; | 1297 | priv->tx_skb = skb; |
1300 | schedule_work(&priv->tx_work); | 1298 | schedule_work(&priv->tx_work); |
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index 8b5a203d3aa2..a48da2dc907f 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c | |||
@@ -908,7 +908,7 @@ static void epic_tx_timeout(struct net_device *dev) | |||
908 | outl(TxQueued, dev->base_addr + COMMAND); | 908 | outl(TxQueued, dev->base_addr + COMMAND); |
909 | } | 909 | } |
910 | 910 | ||
911 | dev->trans_start = jiffies; | 911 | dev->trans_start = jiffies; /* prevent tx timeout */ |
912 | ep->stats.tx_errors++; | 912 | ep->stats.tx_errors++; |
913 | if (!ep->tx_full) | 913 | if (!ep->tx_full) |
914 | netif_wake_queue(dev); | 914 | netif_wake_queue(dev); |
@@ -1006,7 +1006,6 @@ static netdev_tx_t epic_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1006 | /* Trigger an immediate transmit demand. */ | 1006 | /* Trigger an immediate transmit demand. */ |
1007 | outl(TxQueued, dev->base_addr + COMMAND); | 1007 | outl(TxQueued, dev->base_addr + COMMAND); |
1008 | 1008 | ||
1009 | dev->trans_start = jiffies; | ||
1010 | if (debug > 4) | 1009 | if (debug > 4) |
1011 | printk(KERN_DEBUG "%s: Queued Tx packet size %d to slot %d, " | 1010 | printk(KERN_DEBUG "%s: Queued Tx packet size %d to slot %d, " |
1012 | "flag %2.2x Tx status %8.8x.\n", | 1011 | "flag %2.2x Tx status %8.8x.\n", |
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 | } |
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index ad1bc7317df6..14cbde5cf68e 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c | |||
@@ -851,7 +851,6 @@ static netdev_tx_t ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
851 | netif_stop_queue(dev); | 851 | netif_stop_queue(dev); |
852 | } | 852 | } |
853 | 853 | ||
854 | dev->trans_start = jiffies; | ||
855 | spin_unlock_irq(&priv->lock); | 854 | spin_unlock_irq(&priv->lock); |
856 | out: | 855 | out: |
857 | dev_kfree_skb(skb); | 856 | dev_kfree_skb(skb); |
diff --git a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c index 11ba70f49971..99eb56be093f 100644 --- a/drivers/net/ewrk3.c +++ b/drivers/net/ewrk3.c | |||
@@ -757,7 +757,7 @@ static void ewrk3_timeout(struct net_device *dev) | |||
757 | */ | 757 | */ |
758 | ENABLE_IRQs; | 758 | ENABLE_IRQs; |
759 | 759 | ||
760 | dev->trans_start = jiffies; | 760 | dev->trans_start = jiffies; /* prevent tx timeout */ |
761 | netif_wake_queue(dev); | 761 | netif_wake_queue(dev); |
762 | } | 762 | } |
763 | } | 763 | } |
@@ -862,7 +862,6 @@ static netdev_tx_t ewrk3_queue_pkt(struct sk_buff *skb, struct net_device *dev) | |||
862 | spin_unlock_irq (&lp->hw_lock); | 862 | spin_unlock_irq (&lp->hw_lock); |
863 | 863 | ||
864 | dev->stats.tx_bytes += skb->len; | 864 | dev->stats.tx_bytes += skb->len; |
865 | dev->trans_start = jiffies; | ||
866 | dev_kfree_skb (skb); | 865 | dev_kfree_skb (skb); |
867 | 866 | ||
868 | /* Check for free resources: stop Tx queue if there are none */ | 867 | /* Check for free resources: stop Tx queue if there are none */ |
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c index 51b738dd6547..15f4f8d3d46d 100644 --- a/drivers/net/fealnx.c +++ b/drivers/net/fealnx.c | |||
@@ -1233,7 +1233,7 @@ static void fealnx_tx_timeout(struct net_device *dev) | |||
1233 | 1233 | ||
1234 | spin_unlock_irqrestore(&np->lock, flags); | 1234 | spin_unlock_irqrestore(&np->lock, flags); |
1235 | 1235 | ||
1236 | dev->trans_start = jiffies; | 1236 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1237 | np->stats.tx_errors++; | 1237 | np->stats.tx_errors++; |
1238 | netif_wake_queue(dev); /* or .._start_.. ?? */ | 1238 | netif_wake_queue(dev); /* or .._start_.. ?? */ |
1239 | } | 1239 | } |
@@ -1374,7 +1374,6 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev) | |||
1374 | netif_stop_queue(dev); | 1374 | netif_stop_queue(dev); |
1375 | ++np->really_tx_count; | 1375 | ++np->really_tx_count; |
1376 | iowrite32(0, np->mem + TXPDR); | 1376 | iowrite32(0, np->mem + TXPDR); |
1377 | dev->trans_start = jiffies; | ||
1378 | 1377 | ||
1379 | spin_unlock_irqrestore(&np->lock, flags); | 1378 | spin_unlock_irqrestore(&np->lock, flags); |
1380 | return NETDEV_TX_OK; | 1379 | return NETDEV_TX_OK; |
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 2b1651aee13f..47da51957803 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -275,8 +275,6 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
275 | | BD_ENET_TX_LAST | BD_ENET_TX_TC); | 275 | | BD_ENET_TX_LAST | BD_ENET_TX_TC); |
276 | bdp->cbd_sc = status; | 276 | bdp->cbd_sc = status; |
277 | 277 | ||
278 | dev->trans_start = jiffies; | ||
279 | |||
280 | /* Trigger transmission start */ | 278 | /* Trigger transmission start */ |
281 | writel(0, fep->hwp + FEC_X_DES_ACTIVE); | 279 | writel(0, fep->hwp + FEC_X_DES_ACTIVE); |
282 | 280 | ||
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 0376c3e472a7..221f440c10f4 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -327,7 +327,6 @@ static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
327 | } | 327 | } |
328 | 328 | ||
329 | spin_lock_irqsave(&priv->lock, flags); | 329 | spin_lock_irqsave(&priv->lock, flags); |
330 | dev->trans_start = jiffies; | ||
331 | 330 | ||
332 | bd = (struct bcom_fec_bd *) | 331 | bd = (struct bcom_fec_bd *) |
333 | bcom_prepare_next_buffer(priv->tx_dmatsk); | 332 | bcom_prepare_next_buffer(priv->tx_dmatsk); |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index e282d0ae6a3d..268ea4d566d7 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2214,7 +2214,6 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2214 | dprintk("\n"); | 2214 | dprintk("\n"); |
2215 | } | 2215 | } |
2216 | 2216 | ||
2217 | dev->trans_start = jiffies; | ||
2218 | writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); | 2217 | writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); |
2219 | return NETDEV_TX_OK; | 2218 | return NETDEV_TX_OK; |
2220 | } | 2219 | } |
@@ -2369,7 +2368,6 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb, | |||
2369 | dprintk("\n"); | 2368 | dprintk("\n"); |
2370 | } | 2369 | } |
2371 | 2370 | ||
2372 | dev->trans_start = jiffies; | ||
2373 | writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); | 2371 | writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); |
2374 | return NETDEV_TX_OK; | 2372 | return NETDEV_TX_OK; |
2375 | } | 2373 | } |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 0770e2f6da6b..0fb0fefcb787 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -674,8 +674,6 @@ static int fs_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
674 | skb->data, skb->len, DMA_TO_DEVICE)); | 674 | skb->data, skb->len, DMA_TO_DEVICE)); |
675 | CBDW_DATLEN(bdp, skb->len); | 675 | CBDW_DATLEN(bdp, skb->len); |
676 | 676 | ||
677 | dev->trans_start = jiffies; | ||
678 | |||
679 | /* | 677 | /* |
680 | * If this was the last BD in the ring, start at the beginning again. | 678 | * If this was the last BD in the ring, start at the beginning again. |
681 | */ | 679 | */ |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 5267c27e3174..11d8cae415e5 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -1738,7 +1738,7 @@ void gfar_start(struct net_device *dev) | |||
1738 | gfar_write(®s->imask, IMASK_DEFAULT); | 1738 | gfar_write(®s->imask, IMASK_DEFAULT); |
1739 | } | 1739 | } |
1740 | 1740 | ||
1741 | dev->trans_start = jiffies; | 1741 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1742 | } | 1742 | } |
1743 | 1743 | ||
1744 | void gfar_configure_coalescing(struct gfar_private *priv, | 1744 | void gfar_configure_coalescing(struct gfar_private *priv, |
@@ -2161,8 +2161,6 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2161 | /* reduce TxBD free count */ | 2161 | /* reduce TxBD free count */ |
2162 | tx_queue->num_txbdfree -= (nr_txbds); | 2162 | tx_queue->num_txbdfree -= (nr_txbds); |
2163 | 2163 | ||
2164 | dev->trans_start = jiffies; | ||
2165 | |||
2166 | /* If the next BD still needs to be cleaned up, then the bds | 2164 | /* If the next BD still needs to be cleaned up, then the bds |
2167 | are full. We need to tell the kernel to stop sending us stuff. */ | 2165 | are full. We need to tell the kernel to stop sending us stuff. */ |
2168 | if (!tx_queue->num_txbdfree) { | 2166 | if (!tx_queue->num_txbdfree) { |
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index 0f3f6c2e6942..68e5ac8832ad 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c | |||
@@ -1102,7 +1102,7 @@ static int hp100_open(struct net_device *dev) | |||
1102 | return -EAGAIN; | 1102 | return -EAGAIN; |
1103 | } | 1103 | } |
1104 | 1104 | ||
1105 | dev->trans_start = jiffies; | 1105 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1106 | netif_start_queue(dev); | 1106 | netif_start_queue(dev); |
1107 | 1107 | ||
1108 | lp->lan_type = hp100_sense_lan(dev); | 1108 | lp->lan_type = hp100_sense_lan(dev); |
@@ -1510,7 +1510,7 @@ static netdev_tx_t hp100_start_xmit_bm(struct sk_buff *skb, | |||
1510 | printk("hp100: %s: start_xmit_bm: No TX PDL available.\n", dev->name); | 1510 | printk("hp100: %s: start_xmit_bm: No TX PDL available.\n", dev->name); |
1511 | #endif | 1511 | #endif |
1512 | /* not waited long enough since last tx? */ | 1512 | /* not waited long enough since last tx? */ |
1513 | if (time_before(jiffies, dev->trans_start + HZ)) | 1513 | if (time_before(jiffies, dev_trans_start(dev) + HZ)) |
1514 | goto drop; | 1514 | goto drop; |
1515 | 1515 | ||
1516 | if (hp100_check_lan(dev)) | 1516 | if (hp100_check_lan(dev)) |
@@ -1547,7 +1547,6 @@ static netdev_tx_t hp100_start_xmit_bm(struct sk_buff *skb, | |||
1547 | } | 1547 | } |
1548 | } | 1548 | } |
1549 | 1549 | ||
1550 | dev->trans_start = jiffies; | ||
1551 | goto drop; | 1550 | goto drop; |
1552 | } | 1551 | } |
1553 | 1552 | ||
@@ -1585,7 +1584,6 @@ static netdev_tx_t hp100_start_xmit_bm(struct sk_buff *skb, | |||
1585 | /* Update statistics */ | 1584 | /* Update statistics */ |
1586 | lp->stats.tx_packets++; | 1585 | lp->stats.tx_packets++; |
1587 | lp->stats.tx_bytes += skb->len; | 1586 | lp->stats.tx_bytes += skb->len; |
1588 | dev->trans_start = jiffies; | ||
1589 | 1587 | ||
1590 | return NETDEV_TX_OK; | 1588 | return NETDEV_TX_OK; |
1591 | 1589 | ||
@@ -1663,7 +1661,7 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, | |||
1663 | printk("hp100: %s: start_xmit: tx free mem = 0x%x\n", dev->name, i); | 1661 | printk("hp100: %s: start_xmit: tx free mem = 0x%x\n", dev->name, i); |
1664 | #endif | 1662 | #endif |
1665 | /* not waited long enough since last failed tx try? */ | 1663 | /* not waited long enough since last failed tx try? */ |
1666 | if (time_before(jiffies, dev->trans_start + HZ)) { | 1664 | if (time_before(jiffies, dev_trans_start(dev) + HZ)) { |
1667 | #ifdef HP100_DEBUG | 1665 | #ifdef HP100_DEBUG |
1668 | printk("hp100: %s: trans_start timing problem\n", | 1666 | printk("hp100: %s: trans_start timing problem\n", |
1669 | dev->name); | 1667 | dev->name); |
@@ -1701,7 +1699,6 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, | |||
1701 | mdelay(1); | 1699 | mdelay(1); |
1702 | } | 1700 | } |
1703 | } | 1701 | } |
1704 | dev->trans_start = jiffies; | ||
1705 | goto drop; | 1702 | goto drop; |
1706 | } | 1703 | } |
1707 | 1704 | ||
@@ -1745,7 +1742,6 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, | |||
1745 | 1742 | ||
1746 | lp->stats.tx_packets++; | 1743 | lp->stats.tx_packets++; |
1747 | lp->stats.tx_bytes += skb->len; | 1744 | lp->stats.tx_bytes += skb->len; |
1748 | dev->trans_start = jiffies; | ||
1749 | hp100_ints_on(); | 1745 | hp100_ints_on(); |
1750 | spin_unlock_irqrestore(&lp->lock, flags); | 1746 | spin_unlock_irqrestore(&lp->lock, flags); |
1751 | 1747 | ||
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 0d2c3ac2005e..092fb9d76693 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -957,7 +957,7 @@ static netdev_tx_t ibmveth_start_xmit(struct sk_buff *skb, | |||
957 | } else { | 957 | } else { |
958 | tx_packets++; | 958 | tx_packets++; |
959 | tx_bytes += skb->len; | 959 | tx_bytes += skb->len; |
960 | netdev->trans_start = jiffies; | 960 | netdev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */ |
961 | } | 961 | } |
962 | 962 | ||
963 | if (!used_bounce) | 963 | if (!used_bounce) |
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index f4081c0a2d9c..ab9f675c5b8b 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c | |||
@@ -182,7 +182,6 @@ static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev) | |||
182 | netif_stop_queue(dev); | 182 | netif_stop_queue(dev); |
183 | } | 183 | } |
184 | 184 | ||
185 | dev->trans_start = jiffies; | ||
186 | skb_queue_tail(&dp->rq, skb); | 185 | skb_queue_tail(&dp->rq, skb); |
187 | if (!dp->tasklet_pending) { | 186 | if (!dp->tasklet_pending) { |
188 | dp->tasklet_pending = 1; | 187 | dp->tasklet_pending = 1; |
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index 091ea3377ed0..e3b5e9490601 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c | |||
@@ -1503,7 +1503,6 @@ static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1503 | 1503 | ||
1504 | BARRIER(); | 1504 | BARRIER(); |
1505 | 1505 | ||
1506 | dev->trans_start = jiffies; | ||
1507 | ip->tx_skbs[produce] = skb; /* Remember skb */ | 1506 | ip->tx_skbs[produce] = skb; /* Remember skb */ |
1508 | produce = (produce + 1) & 127; | 1507 | produce = (produce + 1) & 127; |
1509 | ip->tx_pi = produce; | 1508 | ip->tx_pi = produce; |
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c index b5cbd39d0685..a3d696a9456a 100644 --- a/drivers/net/irda/au1k_ir.c +++ b/drivers/net/irda/au1k_ir.c | |||
@@ -546,7 +546,6 @@ static int au1k_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
546 | 546 | ||
547 | dev_kfree_skb(skb); | 547 | dev_kfree_skb(skb); |
548 | aup->tx_head = (aup->tx_head + 1) & (NUM_IR_DESC - 1); | 548 | aup->tx_head = (aup->tx_head + 1) & (NUM_IR_DESC - 1); |
549 | dev->trans_start = jiffies; | ||
550 | return NETDEV_TX_OK; | 549 | return NETDEV_TX_OK; |
551 | } | 550 | } |
552 | 551 | ||
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index b7e6625ca75e..48bd5ec9f29b 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
@@ -1002,8 +1002,6 @@ toshoboe_hard_xmit (struct sk_buff *skb, struct net_device *dev) | |||
1002 | 1002 | ||
1003 | toshoboe_checkstuck (self); | 1003 | toshoboe_checkstuck (self); |
1004 | 1004 | ||
1005 | dev->trans_start = jiffies; | ||
1006 | |||
1007 | /* Check if we need to change the speed */ | 1005 | /* Check if we need to change the speed */ |
1008 | /* But not now. Wait after transmission if mtt not required */ | 1006 | /* But not now. Wait after transmission if mtt not required */ |
1009 | speed=irda_get_next_speed(skb); | 1007 | speed=irda_get_next_speed(skb); |
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index 1a54f6bb68c5..c192c31e4c5c 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
@@ -556,7 +556,6 @@ static int pxa_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
556 | } | 556 | } |
557 | 557 | ||
558 | dev_kfree_skb(skb); | 558 | dev_kfree_skb(skb); |
559 | dev->trans_start = jiffies; | ||
560 | return NETDEV_TX_OK; | 559 | return NETDEV_TX_OK; |
561 | } | 560 | } |
562 | 561 | ||
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c index 1dcdce0631aa..da2705061a60 100644 --- a/drivers/net/irda/sa1100_ir.c +++ b/drivers/net/irda/sa1100_ir.c | |||
@@ -715,8 +715,6 @@ static int sa1100_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
715 | Ser2HSCR0 = si->hscr0 | HSCR0_HSSP | HSCR0_TXE; | 715 | Ser2HSCR0 = si->hscr0 | HSCR0_HSSP | HSCR0_TXE; |
716 | } | 716 | } |
717 | 717 | ||
718 | dev->trans_start = jiffies; | ||
719 | |||
720 | return NETDEV_TX_OK; | 718 | return NETDEV_TX_OK; |
721 | } | 719 | } |
722 | 720 | ||
diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c index de91cd14016b..1b051dab7b29 100644 --- a/drivers/net/irda/sir_dev.c +++ b/drivers/net/irda/sir_dev.c | |||
@@ -655,7 +655,6 @@ static netdev_tx_t sirdev_hard_xmit(struct sk_buff *skb, | |||
655 | 655 | ||
656 | if (likely(actual > 0)) { | 656 | if (likely(actual > 0)) { |
657 | dev->tx_skb = skb; | 657 | dev->tx_skb = skb; |
658 | ndev->trans_start = jiffies; | ||
659 | dev->tx_buff.data += actual; | 658 | dev->tx_buff.data += actual; |
660 | dev->tx_buff.len -= actual; | 659 | dev->tx_buff.len -= actual; |
661 | } | 660 | } |
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 6af84d88cd03..35e4e44040a2 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c | |||
@@ -868,7 +868,7 @@ static void smsc_ircc_timeout(struct net_device *dev) | |||
868 | spin_lock_irqsave(&self->lock, flags); | 868 | spin_lock_irqsave(&self->lock, flags); |
869 | smsc_ircc_sir_start(self); | 869 | smsc_ircc_sir_start(self); |
870 | smsc_ircc_change_speed(self, self->io.speed); | 870 | smsc_ircc_change_speed(self, self->io.speed); |
871 | dev->trans_start = jiffies; | 871 | dev->trans_start = jiffies; /* prevent tx timeout */ |
872 | netif_wake_queue(dev); | 872 | netif_wake_queue(dev); |
873 | spin_unlock_irqrestore(&self->lock, flags); | 873 | spin_unlock_irqrestore(&self->lock, flags); |
874 | } | 874 | } |
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index e14505272870..c3d07382b7fa 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c | |||
@@ -1037,7 +1037,6 @@ static netdev_tx_t vlsi_hard_start_xmit(struct sk_buff *skb, | |||
1037 | wmb(); | 1037 | wmb(); |
1038 | outw(0, iobase+VLSI_PIO_PROMPT); | 1038 | outw(0, iobase+VLSI_PIO_PROMPT); |
1039 | } | 1039 | } |
1040 | ndev->trans_start = jiffies; | ||
1041 | 1040 | ||
1042 | if (ring_put(r) == NULL) { | 1041 | if (ring_put(r) == NULL) { |
1043 | netif_stop_queue(ndev); | 1042 | netif_stop_queue(ndev); |
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index cb0cb758be64..1f9c3f08d1a3 100644 --- a/drivers/net/irda/w83977af_ir.c +++ b/drivers/net/irda/w83977af_ir.c | |||
@@ -515,7 +515,6 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb, | |||
515 | /* Check for empty frame */ | 515 | /* Check for empty frame */ |
516 | if (!skb->len) { | 516 | if (!skb->len) { |
517 | w83977af_change_speed(self, speed); | 517 | w83977af_change_speed(self, speed); |
518 | dev->trans_start = jiffies; | ||
519 | dev_kfree_skb(skb); | 518 | dev_kfree_skb(skb); |
520 | return NETDEV_TX_OK; | 519 | return NETDEV_TX_OK; |
521 | } else | 520 | } else |
@@ -549,7 +548,6 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb, | |||
549 | switch_bank(iobase, SET0); | 548 | switch_bank(iobase, SET0); |
550 | outb(ICR_ETXTHI, iobase+ICR); | 549 | outb(ICR_ETXTHI, iobase+ICR); |
551 | } | 550 | } |
552 | dev->trans_start = jiffies; | ||
553 | dev_kfree_skb(skb); | 551 | dev_kfree_skb(skb); |
554 | 552 | ||
555 | /* Restore set register */ | 553 | /* Restore set register */ |
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index 460c37fee965..40f47b8fe417 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c | |||
@@ -3184,8 +3184,6 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
3184 | ixgbevf_tx_map(adapter, tx_ring, skb, tx_flags, first), | 3184 | ixgbevf_tx_map(adapter, tx_ring, skb, tx_flags, first), |
3185 | skb->len, hdr_len); | 3185 | skb->len, hdr_len); |
3186 | 3186 | ||
3187 | netdev->trans_start = jiffies; | ||
3188 | |||
3189 | ixgbevf_maybe_stop_tx(netdev, tx_ring, DESC_NEEDED); | 3187 | ixgbevf_maybe_stop_tx(netdev, tx_ring, DESC_NEEDED); |
3190 | 3188 | ||
3191 | return NETDEV_TX_OK; | 3189 | return NETDEV_TX_OK; |
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c index d5932ca3e27d..78ddd8b79e7e 100644 --- a/drivers/net/ixp2000/ixpdev.c +++ b/drivers/net/ixp2000/ixpdev.c | |||
@@ -64,8 +64,6 @@ static int ixpdev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
64 | ixp2000_reg_write(RING_TX_PENDING, | 64 | ixp2000_reg_write(RING_TX_PENDING, |
65 | TX_BUF_DESC_BASE + (entry * sizeof(struct ixpdev_tx_desc))); | 65 | TX_BUF_DESC_BASE + (entry * sizeof(struct ixpdev_tx_desc))); |
66 | 66 | ||
67 | dev->trans_start = jiffies; | ||
68 | |||
69 | local_irq_save(flags); | 67 | local_irq_save(flags); |
70 | ip->tx_queue_entries++; | 68 | ip->tx_queue_entries++; |
71 | if (ip->tx_queue_entries == TX_BUF_COUNT_PER_CHAN) | 69 | if (ip->tx_queue_entries == TX_BUF_COUNT_PER_CHAN) |
diff --git a/drivers/net/lance.c b/drivers/net/lance.c index 7b9447646f8a..21f8adaa87c1 100644 --- a/drivers/net/lance.c +++ b/drivers/net/lance.c | |||
@@ -945,7 +945,7 @@ static void lance_tx_timeout (struct net_device *dev) | |||
945 | #endif | 945 | #endif |
946 | lance_restart (dev, 0x0043, 1); | 946 | lance_restart (dev, 0x0043, 1); |
947 | 947 | ||
948 | dev->trans_start = jiffies; | 948 | dev->trans_start = jiffies; /* prevent tx timeout */ |
949 | netif_wake_queue (dev); | 949 | netif_wake_queue (dev); |
950 | } | 950 | } |
951 | 951 | ||
@@ -1011,8 +1011,6 @@ static netdev_tx_t lance_start_xmit(struct sk_buff *skb, | |||
1011 | outw(0x0000, ioaddr+LANCE_ADDR); | 1011 | outw(0x0000, ioaddr+LANCE_ADDR); |
1012 | outw(0x0048, ioaddr+LANCE_DATA); | 1012 | outw(0x0048, ioaddr+LANCE_DATA); |
1013 | 1013 | ||
1014 | dev->trans_start = jiffies; | ||
1015 | |||
1016 | if ((lp->cur_tx - lp->dirty_tx) >= TX_RING_SIZE) | 1014 | if ((lp->cur_tx - lp->dirty_tx) >= TX_RING_SIZE) |
1017 | netif_stop_queue(dev); | 1015 | netif_stop_queue(dev); |
1018 | 1016 | ||
diff --git a/drivers/net/lib82596.c b/drivers/net/lib82596.c index 61c38ab4c247..de856d8abc90 100644 --- a/drivers/net/lib82596.c +++ b/drivers/net/lib82596.c | |||
@@ -963,7 +963,7 @@ static void i596_tx_timeout (struct net_device *dev) | |||
963 | lp->last_restart = dev->stats.tx_packets; | 963 | lp->last_restart = dev->stats.tx_packets; |
964 | } | 964 | } |
965 | 965 | ||
966 | dev->trans_start = jiffies; | 966 | dev->trans_start = jiffies; /* prevent tx timeout */ |
967 | netif_wake_queue (dev); | 967 | netif_wake_queue (dev); |
968 | } | 968 | } |
969 | 969 | ||
@@ -974,7 +974,6 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
974 | struct tx_cmd *tx_cmd; | 974 | struct tx_cmd *tx_cmd; |
975 | struct i596_tbd *tbd; | 975 | struct i596_tbd *tbd; |
976 | short length = skb->len; | 976 | short length = skb->len; |
977 | dev->trans_start = jiffies; | ||
978 | 977 | ||
979 | DEB(DEB_STARTTX, printk(KERN_DEBUG | 978 | DEB(DEB_STARTTX, printk(KERN_DEBUG |
980 | "%s: i596_start_xmit(%x,%p) called\n", | 979 | "%s: i596_start_xmit(%x,%p) called\n", |
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c index 770b606a9e3a..64d51d627d8d 100644 --- a/drivers/net/lib8390.c +++ b/drivers/net/lib8390.c | |||
@@ -257,7 +257,7 @@ static void __ei_tx_timeout(struct net_device *dev) | |||
257 | { | 257 | { |
258 | unsigned long e8390_base = dev->base_addr; | 258 | unsigned long e8390_base = dev->base_addr; |
259 | struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | 259 | struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); |
260 | int txsr, isr, tickssofar = jiffies - dev->trans_start; | 260 | int txsr, isr, tickssofar = jiffies - dev_trans_start(dev); |
261 | unsigned long flags; | 261 | unsigned long flags; |
262 | 262 | ||
263 | dev->stats.tx_errors++; | 263 | dev->stats.tx_errors++; |
@@ -386,7 +386,6 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb, | |||
386 | { | 386 | { |
387 | ei_local->txing = 1; | 387 | ei_local->txing = 1; |
388 | NS8390_trigger_send(dev, send_length, output_page); | 388 | NS8390_trigger_send(dev, send_length, output_page); |
389 | dev->trans_start = jiffies; | ||
390 | if (output_page == ei_local->tx_start_page) | 389 | if (output_page == ei_local->tx_start_page) |
391 | { | 390 | { |
392 | ei_local->tx1 = -1; | 391 | ei_local->tx1 = -1; |
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index 78c9a2e6e51e..b59b24d667f0 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c | |||
@@ -527,7 +527,7 @@ static void temac_device_reset(struct net_device *ndev) | |||
527 | dev_err(&ndev->dev, "Error setting TEMAC options\n"); | 527 | dev_err(&ndev->dev, "Error setting TEMAC options\n"); |
528 | 528 | ||
529 | /* Init Driver variable */ | 529 | /* Init Driver variable */ |
530 | ndev->trans_start = 0; | 530 | ndev->trans_start = jiffies; /* prevent tx timeout */ |
531 | } | 531 | } |
532 | 532 | ||
533 | void temac_adjust_link(struct net_device *ndev) | 533 | void temac_adjust_link(struct net_device *ndev) |
diff --git a/drivers/net/lp486e.c b/drivers/net/lp486e.c index 72379c5439dc..3df046a58b1d 100644 --- a/drivers/net/lp486e.c +++ b/drivers/net/lp486e.c | |||
@@ -875,8 +875,6 @@ static netdev_tx_t i596_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
875 | length = ETH_ZLEN; | 875 | length = ETH_ZLEN; |
876 | } | 876 | } |
877 | 877 | ||
878 | dev->trans_start = jiffies; | ||
879 | |||
880 | tx_cmd = kmalloc((sizeof (struct tx_cmd) + sizeof (struct i596_tbd)), GFP_ATOMIC); | 878 | tx_cmd = kmalloc((sizeof (struct tx_cmd) + sizeof (struct i596_tbd)), GFP_ATOMIC); |
881 | if (tx_cmd == NULL) { | 879 | if (tx_cmd == NULL) { |
882 | printk(KERN_WARNING "%s: i596_xmit Memory squeeze, dropping packet.\n", dev->name); | 880 | printk(KERN_WARNING "%s: i596_xmit Memory squeeze, dropping packet.\n", dev->name); |
diff --git a/drivers/net/mac89x0.c b/drivers/net/mac89x0.c index c0876e915eed..69fa4ef64dd2 100644 --- a/drivers/net/mac89x0.c +++ b/drivers/net/mac89x0.c | |||
@@ -408,7 +408,6 @@ net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
408 | skb->len+1); | 408 | skb->len+1); |
409 | 409 | ||
410 | local_irq_restore(flags); | 410 | local_irq_restore(flags); |
411 | dev->trans_start = jiffies; | ||
412 | dev_kfree_skb (skb); | 411 | dev_kfree_skb (skb); |
413 | 412 | ||
414 | return NETDEV_TX_OK; | 413 | return NETDEV_TX_OK; |
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index cf7debc865b3..40797fbdca9f 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
@@ -666,8 +666,6 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
666 | 666 | ||
667 | spin_unlock_irqrestore(&bp->lock, flags); | 667 | spin_unlock_irqrestore(&bp->lock, flags); |
668 | 668 | ||
669 | dev->trans_start = jiffies; | ||
670 | |||
671 | return NETDEV_TX_OK; | 669 | return NETDEV_TX_OK; |
672 | } | 670 | } |
673 | 671 | ||
diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c index a6e19fc8a80a..c685a4656878 100644 --- a/drivers/net/macmace.c +++ b/drivers/net/macmace.c | |||
@@ -488,7 +488,6 @@ static int mace_xmit_start(struct sk_buff *skb, struct net_device *dev) | |||
488 | 488 | ||
489 | dev_kfree_skb(skb); | 489 | dev_kfree_skb(skb); |
490 | 490 | ||
491 | dev->trans_start = jiffies; | ||
492 | return NETDEV_TX_OK; | 491 | return NETDEV_TX_OK; |
493 | } | 492 | } |
494 | 493 | ||
diff --git a/drivers/net/meth.c b/drivers/net/meth.c index 9f72cb45f4af..16a35944c2da 100644 --- a/drivers/net/meth.c +++ b/drivers/net/meth.c | |||
@@ -746,7 +746,7 @@ static void meth_tx_timeout(struct net_device *dev) | |||
746 | /* Enable interrupt */ | 746 | /* Enable interrupt */ |
747 | spin_unlock_irqrestore(&priv->meth_lock, flags); | 747 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
748 | 748 | ||
749 | dev->trans_start = jiffies; | 749 | dev->trans_start = jiffies; /* prevent tx timeout */ |
750 | netif_wake_queue(dev); | 750 | netif_wake_queue(dev); |
751 | 751 | ||
752 | return; | 752 | return; |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 4ee9d04f6599..1f724e53c728 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -882,7 +882,6 @@ static netdev_tx_t mv643xx_eth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
882 | 882 | ||
883 | txq->tx_bytes += skb->len; | 883 | txq->tx_bytes += skb->len; |
884 | txq->tx_packets++; | 884 | txq->tx_packets++; |
885 | dev->trans_start = jiffies; | ||
886 | 885 | ||
887 | entries_left = txq->tx_ring_size - txq->tx_desc_count; | 886 | entries_left = txq->tx_ring_size - txq->tx_desc_count; |
888 | if (entries_left < MAX_SKB_FRAGS + 1) | 887 | if (entries_left < MAX_SKB_FRAGS + 1) |
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index 9250bf6573ec..2a17b503feaa 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c | |||
@@ -1905,7 +1905,7 @@ static void ns_tx_timeout(struct net_device *dev) | |||
1905 | spin_unlock_irq(&np->lock); | 1905 | spin_unlock_irq(&np->lock); |
1906 | enable_irq(dev->irq); | 1906 | enable_irq(dev->irq); |
1907 | 1907 | ||
1908 | dev->trans_start = jiffies; | 1908 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1909 | np->stats.tx_errors++; | 1909 | np->stats.tx_errors++; |
1910 | netif_wake_queue(dev); | 1910 | netif_wake_queue(dev); |
1911 | } | 1911 | } |
@@ -2119,8 +2119,6 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev) | |||
2119 | } | 2119 | } |
2120 | spin_unlock_irqrestore(&np->lock, flags); | 2120 | spin_unlock_irqrestore(&np->lock, flags); |
2121 | 2121 | ||
2122 | dev->trans_start = jiffies; | ||
2123 | |||
2124 | if (netif_msg_tx_queued(np)) { | 2122 | if (netif_msg_tx_queued(np)) { |
2125 | printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d.\n", | 2123 | printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d.\n", |
2126 | dev->name, np->cur_tx, entry); | 2124 | dev->name, np->cur_tx, entry); |
diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c index 64770298c4f7..2e4b42175f3f 100644 --- a/drivers/net/netx-eth.c +++ b/drivers/net/netx-eth.c | |||
@@ -126,7 +126,6 @@ netx_eth_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
126 | FIFO_PTR_FRAMENO(1) | | 126 | FIFO_PTR_FRAMENO(1) | |
127 | FIFO_PTR_FRAMELEN(len)); | 127 | FIFO_PTR_FRAMELEN(len)); |
128 | 128 | ||
129 | ndev->trans_start = jiffies; | ||
130 | ndev->stats.tx_packets++; | 129 | ndev->stats.tx_packets++; |
131 | ndev->stats.tx_bytes += skb->len; | 130 | ndev->stats.tx_bytes += skb->len; |
132 | 131 | ||
diff --git a/drivers/net/ni5010.c b/drivers/net/ni5010.c index 3892330f244a..f80b50159114 100644 --- a/drivers/net/ni5010.c +++ b/drivers/net/ni5010.c | |||
@@ -444,7 +444,7 @@ static void ni5010_timeout(struct net_device *dev) | |||
444 | /* Try to restart the adaptor. */ | 444 | /* Try to restart the adaptor. */ |
445 | /* FIXME: Give it a real kick here */ | 445 | /* FIXME: Give it a real kick here */ |
446 | chipset_init(dev, 1); | 446 | chipset_init(dev, 1); |
447 | dev->trans_start = jiffies; | 447 | dev->trans_start = jiffies; /* prevent tx timeout */ |
448 | netif_wake_queue(dev); | 448 | netif_wake_queue(dev); |
449 | } | 449 | } |
450 | 450 | ||
@@ -460,7 +460,6 @@ static int ni5010_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
460 | 460 | ||
461 | netif_stop_queue(dev); | 461 | netif_stop_queue(dev); |
462 | hardware_send_packet(dev, (unsigned char *)skb->data, skb->len, length-skb->len); | 462 | hardware_send_packet(dev, (unsigned char *)skb->data, skb->len, length-skb->len); |
463 | dev->trans_start = jiffies; | ||
464 | dev_kfree_skb (skb); | 463 | dev_kfree_skb (skb); |
465 | return NETDEV_TX_OK; | 464 | return NETDEV_TX_OK; |
466 | } | 465 | } |
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c index b7837ebd9a7d..9bddb5fa7a96 100644 --- a/drivers/net/ni52.c +++ b/drivers/net/ni52.c | |||
@@ -1147,7 +1147,7 @@ static void ni52_timeout(struct net_device *dev) | |||
1147 | writeb(CUC_START, &p->scb->cmd_cuc); | 1147 | writeb(CUC_START, &p->scb->cmd_cuc); |
1148 | ni_attn586(); | 1148 | ni_attn586(); |
1149 | wait_for_scb_cmd(dev); | 1149 | wait_for_scb_cmd(dev); |
1150 | dev->trans_start = jiffies; | 1150 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1151 | return 0; | 1151 | return 0; |
1152 | } | 1152 | } |
1153 | #endif | 1153 | #endif |
@@ -1165,7 +1165,7 @@ static void ni52_timeout(struct net_device *dev) | |||
1165 | ni52_close(dev); | 1165 | ni52_close(dev); |
1166 | ni52_open(dev); | 1166 | ni52_open(dev); |
1167 | } | 1167 | } |
1168 | dev->trans_start = jiffies; | 1168 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1169 | } | 1169 | } |
1170 | 1170 | ||
1171 | /****************************************************** | 1171 | /****************************************************** |
@@ -1218,7 +1218,6 @@ static netdev_tx_t ni52_send_packet(struct sk_buff *skb, | |||
1218 | writeb(CUC_START, &p->scb->cmd_cuc); | 1218 | writeb(CUC_START, &p->scb->cmd_cuc); |
1219 | } | 1219 | } |
1220 | ni_attn586(); | 1220 | ni_attn586(); |
1221 | dev->trans_start = jiffies; | ||
1222 | if (!i) | 1221 | if (!i) |
1223 | dev_kfree_skb(skb); | 1222 | dev_kfree_skb(skb); |
1224 | wait_for_scb_cmd(dev); | 1223 | wait_for_scb_cmd(dev); |
@@ -1240,7 +1239,6 @@ static netdev_tx_t ni52_send_packet(struct sk_buff *skb, | |||
1240 | writew(0, &p->nop_cmds[next_nop]->cmd_status); | 1239 | writew(0, &p->nop_cmds[next_nop]->cmd_status); |
1241 | 1240 | ||
1242 | writew(make16(p->xmit_cmds[0]), &p->nop_cmds[p->nop_point]->cmd_link); | 1241 | writew(make16(p->xmit_cmds[0]), &p->nop_cmds[p->nop_point]->cmd_link); |
1243 | dev->trans_start = jiffies; | ||
1244 | p->nop_point = next_nop; | 1242 | p->nop_point = next_nop; |
1245 | dev_kfree_skb(skb); | 1243 | dev_kfree_skb(skb); |
1246 | # endif | 1244 | # endif |
@@ -1256,7 +1254,6 @@ static netdev_tx_t ni52_send_packet(struct sk_buff *skb, | |||
1256 | writew(0, &p->nop_cmds[next_nop]->cmd_status); | 1254 | writew(0, &p->nop_cmds[next_nop]->cmd_status); |
1257 | writew(make16(p->xmit_cmds[p->xmit_count]), | 1255 | writew(make16(p->xmit_cmds[p->xmit_count]), |
1258 | &p->nop_cmds[p->xmit_count]->cmd_link); | 1256 | &p->nop_cmds[p->xmit_count]->cmd_link); |
1259 | dev->trans_start = jiffies; | ||
1260 | p->xmit_count = next_nop; | 1257 | p->xmit_count = next_nop; |
1261 | { | 1258 | { |
1262 | unsigned long flags; | 1259 | unsigned long flags; |
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 | } |
diff --git a/drivers/net/octeon/octeon_mgmt.c b/drivers/net/octeon/octeon_mgmt.c index 392470333174..43bf26fb5133 100644 --- a/drivers/net/octeon/octeon_mgmt.c +++ b/drivers/net/octeon/octeon_mgmt.c | |||
@@ -992,7 +992,6 @@ static int octeon_mgmt_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
992 | /* Ring the bell. */ | 992 | /* Ring the bell. */ |
993 | cvmx_write_csr(CVMX_MIXX_ORING2(port), 1); | 993 | cvmx_write_csr(CVMX_MIXX_ORING2(port), 1); |
994 | 994 | ||
995 | netdev->trans_start = jiffies; | ||
996 | rv = NETDEV_TX_OK; | 995 | rv = NETDEV_TX_OK; |
997 | out: | 996 | out: |
998 | octeon_mgmt_update_tx_stats(netdev); | 997 | octeon_mgmt_update_tx_stats(netdev); |
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c index dc3b4c7914fd..56f3fc45dbaa 100644 --- a/drivers/net/pci-skeleton.c +++ b/drivers/net/pci-skeleton.c | |||
@@ -1354,7 +1354,6 @@ static int netdrv_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1354 | NETDRV_W32(TxStatus0 + (entry * sizeof(u32)), | 1354 | NETDRV_W32(TxStatus0 + (entry * sizeof(u32)), |
1355 | tp->tx_flag | (skb->len >= ETH_ZLEN ? skb->len : ETH_ZLEN)); | 1355 | tp->tx_flag | (skb->len >= ETH_ZLEN ? skb->len : ETH_ZLEN)); |
1356 | 1356 | ||
1357 | dev->trans_start = jiffies; | ||
1358 | atomic_inc(&tp->cur_tx); | 1357 | atomic_inc(&tp->cur_tx); |
1359 | if ((atomic_read(&tp->cur_tx) - atomic_read(&tp->dirty_tx)) >= NUM_TX_DESC) | 1358 | if ((atomic_read(&tp->cur_tx) - atomic_read(&tp->dirty_tx)) >= NUM_TX_DESC) |
1360 | netif_stop_queue(dev); | 1359 | netif_stop_queue(dev); |
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); |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 580977f56ad0..d6a459dd4894 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -563,7 +563,7 @@ static void el3_tx_timeout(struct net_device *dev) | |||
563 | netdev_warn(dev, "Transmit timed out!\n"); | 563 | netdev_warn(dev, "Transmit timed out!\n"); |
564 | dump_status(dev); | 564 | dump_status(dev); |
565 | dev->stats.tx_errors++; | 565 | dev->stats.tx_errors++; |
566 | dev->trans_start = jiffies; | 566 | dev->trans_start = jiffies; /* prevent tx timeout */ |
567 | /* Issue TX_RESET and TX_START commands. */ | 567 | /* Issue TX_RESET and TX_START commands. */ |
568 | tc589_wait_for_completion(dev, TxReset); | 568 | tc589_wait_for_completion(dev, TxReset); |
569 | outw(TxEnable, ioaddr + EL3_CMD); | 569 | outw(TxEnable, ioaddr + EL3_CMD); |
@@ -611,7 +611,6 @@ static netdev_tx_t el3_start_xmit(struct sk_buff *skb, | |||
611 | /* ... and the packet rounded to a doubleword. */ | 611 | /* ... and the packet rounded to a doubleword. */ |
612 | outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2); | 612 | outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2); |
613 | 613 | ||
614 | dev->trans_start = jiffies; | ||
615 | if (inw(ioaddr + TX_FREE) <= 1536) { | 614 | if (inw(ioaddr + TX_FREE) <= 1536) { |
616 | netif_stop_queue(dev); | 615 | netif_stop_queue(dev); |
617 | /* Interrupt us when the FIFO has room for max-sized packet. */ | 616 | /* Interrupt us when the FIFO has room for max-sized packet. */ |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 70fc9591821f..a1a6b087e242 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -1005,7 +1005,7 @@ static void axnet_tx_timeout(struct net_device *dev) | |||
1005 | { | 1005 | { |
1006 | long e8390_base = dev->base_addr; | 1006 | long e8390_base = dev->base_addr; |
1007 | struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | 1007 | struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); |
1008 | int txsr, isr, tickssofar = jiffies - dev->trans_start; | 1008 | int txsr, isr, tickssofar = jiffies - dev_trans_start(dev); |
1009 | unsigned long flags; | 1009 | unsigned long flags; |
1010 | 1010 | ||
1011 | dev->stats.tx_errors++; | 1011 | dev->stats.tx_errors++; |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index 6734f7d6da98..16fc3e53c5cb 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -890,7 +890,6 @@ static netdev_tx_t fjn_start_xmit(struct sk_buff *skb, | |||
890 | lp->sent = lp->tx_queue ; | 890 | lp->sent = lp->tx_queue ; |
891 | lp->tx_queue = 0; | 891 | lp->tx_queue = 0; |
892 | lp->tx_queue_len = 0; | 892 | lp->tx_queue_len = 0; |
893 | dev->trans_start = jiffies; | ||
894 | lp->tx_started = 1; | 893 | lp->tx_started = 1; |
895 | netif_start_queue(dev); | 894 | netif_start_queue(dev); |
896 | } else { | 895 | } else { |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index c516c1996354..ca4efd2871f3 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -903,7 +903,7 @@ static void mace_tx_timeout(struct net_device *dev) | |||
903 | #else /* #if RESET_ON_TIMEOUT */ | 903 | #else /* #if RESET_ON_TIMEOUT */ |
904 | printk("NOT resetting card\n"); | 904 | printk("NOT resetting card\n"); |
905 | #endif /* #if RESET_ON_TIMEOUT */ | 905 | #endif /* #if RESET_ON_TIMEOUT */ |
906 | dev->trans_start = jiffies; | 906 | dev->trans_start = jiffies; /* prevent tx timeout */ |
907 | netif_wake_queue(dev); | 907 | netif_wake_queue(dev); |
908 | } | 908 | } |
909 | 909 | ||
@@ -945,8 +945,6 @@ static netdev_tx_t mace_start_xmit(struct sk_buff *skb, | |||
945 | outb(skb->data[skb->len-1], ioaddr + AM2150_XMT); | 945 | outb(skb->data[skb->len-1], ioaddr + AM2150_XMT); |
946 | } | 946 | } |
947 | 947 | ||
948 | dev->trans_start = jiffies; | ||
949 | |||
950 | #if MULTI_TX | 948 | #if MULTI_TX |
951 | if (lp->tx_free_frames > 0) | 949 | if (lp->tx_free_frames > 0) |
952 | netif_start_queue(dev); | 950 | netif_start_queue(dev); |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 949ac1a12537..b5c62db251db 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -1254,7 +1254,7 @@ static void smc_tx_timeout(struct net_device *dev) | |||
1254 | dev->name, inw(ioaddr)&0xff, inw(ioaddr + 2)); | 1254 | dev->name, inw(ioaddr)&0xff, inw(ioaddr + 2)); |
1255 | dev->stats.tx_errors++; | 1255 | dev->stats.tx_errors++; |
1256 | smc_reset(dev); | 1256 | smc_reset(dev); |
1257 | dev->trans_start = jiffies; | 1257 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1258 | smc->saved_skb = NULL; | 1258 | smc->saved_skb = NULL; |
1259 | netif_wake_queue(dev); | 1259 | netif_wake_queue(dev); |
1260 | } | 1260 | } |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index 656be931207a..6622f0401794 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -1295,7 +1295,7 @@ xirc2ps_tx_timeout_task(struct work_struct *work) | |||
1295 | struct net_device *dev = local->dev; | 1295 | struct net_device *dev = local->dev; |
1296 | /* reset the card */ | 1296 | /* reset the card */ |
1297 | do_reset(dev,1); | 1297 | do_reset(dev,1); |
1298 | dev->trans_start = jiffies; | 1298 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1299 | netif_wake_queue(dev); | 1299 | netif_wake_queue(dev); |
1300 | } | 1300 | } |
1301 | 1301 | ||
@@ -1358,7 +1358,6 @@ do_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1358 | PutByte(XIRCREG_CR, TransmitPacket|EnableIntr); | 1358 | PutByte(XIRCREG_CR, TransmitPacket|EnableIntr); |
1359 | 1359 | ||
1360 | dev_kfree_skb (skb); | 1360 | dev_kfree_skb (skb); |
1361 | dev->trans_start = jiffies; | ||
1362 | dev->stats.tx_bytes += pktlen; | 1361 | dev->stats.tx_bytes += pktlen; |
1363 | netif_start_queue(dev); | 1362 | netif_start_queue(dev); |
1364 | return NETDEV_TX_OK; | 1363 | return NETDEV_TX_OK; |
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index a2254f749a9a..566fd89da861 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -448,7 +448,7 @@ static void pcnet32_netif_stop(struct net_device *dev) | |||
448 | { | 448 | { |
449 | struct pcnet32_private *lp = netdev_priv(dev); | 449 | struct pcnet32_private *lp = netdev_priv(dev); |
450 | 450 | ||
451 | dev->trans_start = jiffies; | 451 | dev->trans_start = jiffies; /* prevent tx timeout */ |
452 | napi_disable(&lp->napi); | 452 | napi_disable(&lp->napi); |
453 | netif_tx_disable(dev); | 453 | netif_tx_disable(dev); |
454 | } | 454 | } |
@@ -2398,7 +2398,7 @@ static void pcnet32_tx_timeout(struct net_device *dev) | |||
2398 | } | 2398 | } |
2399 | pcnet32_restart(dev, CSR0_NORMAL); | 2399 | pcnet32_restart(dev, CSR0_NORMAL); |
2400 | 2400 | ||
2401 | dev->trans_start = jiffies; | 2401 | dev->trans_start = jiffies; /* prevent tx timeout */ |
2402 | netif_wake_queue(dev); | 2402 | netif_wake_queue(dev); |
2403 | 2403 | ||
2404 | spin_unlock_irqrestore(&lp->lock, flags); | 2404 | spin_unlock_irqrestore(&lp->lock, flags); |
@@ -2449,8 +2449,6 @@ static netdev_tx_t pcnet32_start_xmit(struct sk_buff *skb, | |||
2449 | /* Trigger an immediate send poll. */ | 2449 | /* Trigger an immediate send poll. */ |
2450 | lp->a.write_csr(ioaddr, CSR0, CSR0_INTEN | CSR0_TXPOLL); | 2450 | lp->a.write_csr(ioaddr, CSR0, CSR0_INTEN | CSR0_TXPOLL); |
2451 | 2451 | ||
2452 | dev->trans_start = jiffies; | ||
2453 | |||
2454 | if (lp->tx_ring[(entry + 1) & lp->tx_mod_mask].base != 0) { | 2452 | if (lp->tx_ring[(entry + 1) & lp->tx_mod_mask].base != 0) { |
2455 | lp->tx_full = 1; | 2453 | lp->tx_full = 1; |
2456 | netif_stop_queue(dev); | 2454 | netif_stop_queue(dev); |
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 9a2103a69e17..f4e1f9a38b87 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -979,7 +979,6 @@ plip_tx_packet(struct sk_buff *skb, struct net_device *dev) | |||
979 | printk(KERN_DEBUG "%s: send request\n", dev->name); | 979 | printk(KERN_DEBUG "%s: send request\n", dev->name); |
980 | 980 | ||
981 | spin_lock_irq(&nl->lock); | 981 | spin_lock_irq(&nl->lock); |
982 | dev->trans_start = jiffies; | ||
983 | snd->skb = skb; | 982 | snd->skb = skb; |
984 | snd->length.h = skb->len; | 983 | snd->length.h = skb->len; |
985 | snd->state = PLIP_PK_TRIGGER; | 984 | snd->state = PLIP_PK_TRIGGER; |
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index 022317db4673..87d6b8f36304 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
@@ -903,9 +903,6 @@ int gelic_net_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
903 | gelic_descr_release_tx(card, descr->next); | 903 | gelic_descr_release_tx(card, descr->next); |
904 | card->tx_chain.tail = descr->next->next; | 904 | card->tx_chain.tail = descr->next->next; |
905 | dev_info(ctodev(card), "%s: kick failure\n", __func__); | 905 | dev_info(ctodev(card), "%s: kick failure\n", __func__); |
906 | } else { | ||
907 | /* OK, DMA started/reserved */ | ||
908 | netdev->trans_start = jiffies; | ||
909 | } | 906 | } |
910 | 907 | ||
911 | spin_unlock_irqrestore(&card->tx_lock, flags); | 908 | spin_unlock_irqrestore(&card->tx_lock, flags); |
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 412291645596..3cc7befa3eb1 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c | |||
@@ -924,7 +924,6 @@ static netdev_tx_t r6040_start_xmit(struct sk_buff *skb, | |||
924 | if (!lp->tx_free_desc) | 924 | if (!lp->tx_free_desc) |
925 | netif_stop_queue(dev); | 925 | netif_stop_queue(dev); |
926 | 926 | ||
927 | dev->trans_start = jiffies; | ||
928 | spin_unlock_irqrestore(&lp->lock, flags); | 927 | spin_unlock_irqrestore(&lp->lock, flags); |
929 | 928 | ||
930 | return NETDEV_TX_OK; | 929 | return NETDEV_TX_OK; |
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c index f2e335f0d1b7..e26e107f93e0 100644 --- a/drivers/net/rrunner.c +++ b/drivers/net/rrunner.c | |||
@@ -1467,7 +1467,6 @@ static netdev_tx_t rr_start_xmit(struct sk_buff *skb, | |||
1467 | 1467 | ||
1468 | spin_unlock_irqrestore(&rrpriv->lock, flags); | 1468 | spin_unlock_irqrestore(&rrpriv->lock, flags); |
1469 | 1469 | ||
1470 | dev->trans_start = jiffies; | ||
1471 | return NETDEV_TX_OK; | 1470 | return NETDEV_TX_OK; |
1472 | } | 1471 | } |
1473 | 1472 | ||
diff --git a/drivers/net/s6gmac.c b/drivers/net/s6gmac.c index 6b12524ad7c1..a7ff8ea342b4 100644 --- a/drivers/net/s6gmac.c +++ b/drivers/net/s6gmac.c | |||
@@ -852,8 +852,8 @@ static int s6gmac_tx(struct sk_buff *skb, struct net_device *dev) | |||
852 | { | 852 | { |
853 | struct s6gmac *pd = netdev_priv(dev); | 853 | struct s6gmac *pd = netdev_priv(dev); |
854 | unsigned long flags; | 854 | unsigned long flags; |
855 | |||
855 | spin_lock_irqsave(&pd->lock, flags); | 856 | spin_lock_irqsave(&pd->lock, flags); |
856 | dev->trans_start = jiffies; | ||
857 | writel(skb->len << S6_GMAC_BURST_PREWR_LEN | | 857 | writel(skb->len << S6_GMAC_BURST_PREWR_LEN | |
858 | 0 << S6_GMAC_BURST_PREWR_CFE | | 858 | 0 << S6_GMAC_BURST_PREWR_CFE | |
859 | 1 << S6_GMAC_BURST_PREWR_PPE | | 859 | 1 << S6_GMAC_BURST_PREWR_PPE | |
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index fec3c29b2ea8..1f3acc3a5dfd 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -2068,8 +2068,6 @@ static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev) | |||
2068 | return NETDEV_TX_BUSY; | 2068 | return NETDEV_TX_BUSY; |
2069 | } | 2069 | } |
2070 | 2070 | ||
2071 | dev->trans_start = jiffies; | ||
2072 | |||
2073 | spin_unlock_irqrestore(&sc->sbm_lock, flags); | 2071 | spin_unlock_irqrestore(&sc->sbm_lock, flags); |
2074 | 2072 | ||
2075 | return NETDEV_TX_OK; | 2073 | return NETDEV_TX_OK; |
@@ -2488,7 +2486,7 @@ static void sbmac_tx_timeout (struct net_device *dev) | |||
2488 | spin_lock_irqsave(&sc->sbm_lock, flags); | 2486 | spin_lock_irqsave(&sc->sbm_lock, flags); |
2489 | 2487 | ||
2490 | 2488 | ||
2491 | dev->trans_start = jiffies; | 2489 | dev->trans_start = jiffies; /* prevent tx timeout */ |
2492 | dev->stats.tx_errors++; | 2490 | dev->stats.tx_errors++; |
2493 | 2491 | ||
2494 | spin_unlock_irqrestore(&sc->sbm_lock, flags); | 2492 | spin_unlock_irqrestore(&sc->sbm_lock, flags); |
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c index 1b3260588933..8c4067af32b0 100644 --- a/drivers/net/sc92031.c +++ b/drivers/net/sc92031.c | |||
@@ -987,8 +987,6 @@ static netdev_tx_t sc92031_start_xmit(struct sk_buff *skb, | |||
987 | iowrite32(tx_status, port_base + TxStatus0 + entry * 4); | 987 | iowrite32(tx_status, port_base + TxStatus0 + entry * 4); |
988 | mmiowb(); | 988 | mmiowb(); |
989 | 989 | ||
990 | dev->trans_start = jiffies; | ||
991 | |||
992 | if (priv->tx_head - priv->tx_tail >= NUM_TX_DESC) | 990 | if (priv->tx_head - priv->tx_tail >= NUM_TX_DESC) |
993 | netif_stop_queue(dev); | 991 | netif_stop_queue(dev); |
994 | 992 | ||
diff --git a/drivers/net/seeq8005.c b/drivers/net/seeq8005.c index 374832cca11f..11ab32e0060b 100644 --- a/drivers/net/seeq8005.c +++ b/drivers/net/seeq8005.c | |||
@@ -390,7 +390,7 @@ static void seeq8005_timeout(struct net_device *dev) | |||
390 | tx_done(dev) ? "IRQ conflict" : "network cable problem"); | 390 | tx_done(dev) ? "IRQ conflict" : "network cable problem"); |
391 | /* Try to restart the adaptor. */ | 391 | /* Try to restart the adaptor. */ |
392 | seeq8005_init(dev, 1); | 392 | seeq8005_init(dev, 1); |
393 | dev->trans_start = jiffies; | 393 | dev->trans_start = jiffies; /* prevent tx timeout */ |
394 | netif_wake_queue(dev); | 394 | netif_wake_queue(dev); |
395 | } | 395 | } |
396 | 396 | ||
@@ -411,7 +411,6 @@ static netdev_tx_t seeq8005_send_packet(struct sk_buff *skb, | |||
411 | netif_stop_queue(dev); | 411 | netif_stop_queue(dev); |
412 | 412 | ||
413 | hardware_send_packet(dev, buf, length); | 413 | hardware_send_packet(dev, buf, length); |
414 | dev->trans_start = jiffies; | ||
415 | dev->stats.tx_bytes += length; | 414 | dev->stats.tx_bytes += length; |
416 | dev_kfree_skb (skb); | 415 | dev_kfree_skb (skb); |
417 | /* You might need to clean up and record Tx statistics here. */ | 416 | /* You might need to clean up and record Tx statistics here. */ |
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c index c8fc896fc460..cc4bd8c65f8b 100644 --- a/drivers/net/sgiseeq.c +++ b/drivers/net/sgiseeq.c | |||
@@ -574,7 +574,7 @@ static inline int sgiseeq_reset(struct net_device *dev) | |||
574 | if (err) | 574 | if (err) |
575 | return err; | 575 | return err; |
576 | 576 | ||
577 | dev->trans_start = jiffies; | 577 | dev->trans_start = jiffies; /* prevent tx timeout */ |
578 | netif_wake_queue(dev); | 578 | netif_wake_queue(dev); |
579 | 579 | ||
580 | return 0; | 580 | return 0; |
@@ -638,8 +638,6 @@ static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
638 | if (!(hregs->tx_ctrl & HPC3_ETXCTRL_ACTIVE)) | 638 | if (!(hregs->tx_ctrl & HPC3_ETXCTRL_ACTIVE)) |
639 | kick_tx(dev, sp, hregs); | 639 | kick_tx(dev, sp, hregs); |
640 | 640 | ||
641 | dev->trans_start = jiffies; | ||
642 | |||
643 | if (!TX_BUFFS_AVAIL(sp)) | 641 | if (!TX_BUFFS_AVAIL(sp)) |
644 | netif_stop_queue(dev); | 642 | netif_stop_queue(dev); |
645 | spin_unlock_irqrestore(&sp->tx_lock, flags); | 643 | spin_unlock_irqrestore(&sp->tx_lock, flags); |
@@ -652,7 +650,7 @@ static void timeout(struct net_device *dev) | |||
652 | printk(KERN_NOTICE "%s: transmit timed out, resetting\n", dev->name); | 650 | printk(KERN_NOTICE "%s: transmit timed out, resetting\n", dev->name); |
653 | sgiseeq_reset(dev); | 651 | sgiseeq_reset(dev); |
654 | 652 | ||
655 | dev->trans_start = jiffies; | 653 | dev->trans_start = jiffies; /* prevent tx timeout */ |
656 | netif_wake_queue(dev); | 654 | netif_wake_queue(dev); |
657 | } | 655 | } |
658 | 656 | ||
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 6242b85d5d15..586ed0915a29 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -1148,8 +1148,6 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
1148 | if (!(ctrl_inl(ndev->base_addr + EDTRR) & EDTRR_TRNS)) | 1148 | if (!(ctrl_inl(ndev->base_addr + EDTRR) & EDTRR_TRNS)) |
1149 | ctrl_outl(EDTRR_TRNS, ndev->base_addr + EDTRR); | 1149 | ctrl_outl(EDTRR_TRNS, ndev->base_addr + EDTRR); |
1150 | 1150 | ||
1151 | ndev->trans_start = jiffies; | ||
1152 | |||
1153 | return NETDEV_TX_OK; | 1151 | return NETDEV_TX_OK; |
1154 | } | 1152 | } |
1155 | 1153 | ||
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index 6293592635be..11f7ebedcde5 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c | |||
@@ -1553,7 +1553,7 @@ static void sis900_tx_timeout(struct net_device *net_dev) | |||
1553 | 1553 | ||
1554 | spin_unlock_irqrestore(&sis_priv->lock, flags); | 1554 | spin_unlock_irqrestore(&sis_priv->lock, flags); |
1555 | 1555 | ||
1556 | net_dev->trans_start = jiffies; | 1556 | net_dev->trans_start = jiffies; /* prevent tx timeout */ |
1557 | 1557 | ||
1558 | /* load Transmit Descriptor Register */ | 1558 | /* load Transmit Descriptor Register */ |
1559 | outl(sis_priv->tx_ring_dma, ioaddr + txdp); | 1559 | outl(sis_priv->tx_ring_dma, ioaddr + txdp); |
@@ -1623,8 +1623,6 @@ sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev) | |||
1623 | 1623 | ||
1624 | spin_unlock_irqrestore(&sis_priv->lock, flags); | 1624 | spin_unlock_irqrestore(&sis_priv->lock, flags); |
1625 | 1625 | ||
1626 | net_dev->trans_start = jiffies; | ||
1627 | |||
1628 | if (netif_msg_tx_queued(sis_priv)) | 1626 | if (netif_msg_tx_queued(sis_priv)) |
1629 | printk(KERN_DEBUG "%s: Queued Tx packet at %p size %d " | 1627 | printk(KERN_DEBUG "%s: Queued Tx packet at %p size %d " |
1630 | "to slot %d.\n", | 1628 | "to slot %d.\n", |
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 7912606b0bc7..91adc38d5710 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -1076,7 +1076,6 @@ static netdev_tx_t skfp_send_pkt(struct sk_buff *skb, | |||
1076 | if (bp->QueueSkb == 0) { | 1076 | if (bp->QueueSkb == 0) { |
1077 | netif_stop_queue(dev); | 1077 | netif_stop_queue(dev); |
1078 | } | 1078 | } |
1079 | dev->trans_start = jiffies; | ||
1080 | return NETDEV_TX_OK; | 1079 | return NETDEV_TX_OK; |
1081 | 1080 | ||
1082 | } // skfp_send_pkt | 1081 | } // skfp_send_pkt |
diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 89696156c059..d92772e992d2 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c | |||
@@ -458,7 +458,7 @@ static void sl_tx_timeout(struct net_device *dev) | |||
458 | * 14 Oct 1994 Dmitry Gorodchanin. | 458 | * 14 Oct 1994 Dmitry Gorodchanin. |
459 | */ | 459 | */ |
460 | #ifdef SL_CHECK_TRANSMIT | 460 | #ifdef SL_CHECK_TRANSMIT |
461 | if (time_before(jiffies, dev->trans_start + 20 * HZ)) { | 461 | if (time_before(jiffies, dev_trans_start(dev) + 20 * HZ)) { |
462 | /* 20 sec timeout not reached */ | 462 | /* 20 sec timeout not reached */ |
463 | goto out; | 463 | goto out; |
464 | } | 464 | } |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 1e49fcfa28ab..66831f378396 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -1289,7 +1289,7 @@ static void smc911x_timeout(struct net_device *dev) | |||
1289 | schedule_work(&lp->phy_configure); | 1289 | schedule_work(&lp->phy_configure); |
1290 | 1290 | ||
1291 | /* We can accept TX packets again */ | 1291 | /* We can accept TX packets again */ |
1292 | dev->trans_start = jiffies; | 1292 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1293 | netif_wake_queue(dev); | 1293 | netif_wake_queue(dev); |
1294 | } | 1294 | } |
1295 | 1295 | ||
diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c index d76c8154f52b..acb81a876ac6 100644 --- a/drivers/net/smc9194.c +++ b/drivers/net/smc9194.c | |||
@@ -1164,7 +1164,7 @@ static void smc_timeout(struct net_device *dev) | |||
1164 | /* "kick" the adaptor */ | 1164 | /* "kick" the adaptor */ |
1165 | smc_reset( dev->base_addr ); | 1165 | smc_reset( dev->base_addr ); |
1166 | smc_enable( dev->base_addr ); | 1166 | smc_enable( dev->base_addr ); |
1167 | dev->trans_start = jiffies; | 1167 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1168 | /* clear anything saved */ | 1168 | /* clear anything saved */ |
1169 | ((struct smc_local *)netdev_priv(dev))->saved_skb = NULL; | 1169 | ((struct smc_local *)netdev_priv(dev))->saved_skb = NULL; |
1170 | netif_wake_queue(dev); | 1170 | netif_wake_queue(dev); |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 682bc4fe604f..10cf0cbc2185 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1360,7 +1360,7 @@ static void smc_timeout(struct net_device *dev) | |||
1360 | schedule_work(&lp->phy_configure); | 1360 | schedule_work(&lp->phy_configure); |
1361 | 1361 | ||
1362 | /* We can accept TX packets again */ | 1362 | /* We can accept TX packets again */ |
1363 | dev->trans_start = jiffies; | 1363 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1364 | netif_wake_queue(dev); | 1364 | netif_wake_queue(dev); |
1365 | } | 1365 | } |
1366 | 1366 | ||
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 746fb91a0fb0..89f35f94f720 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
@@ -1335,7 +1335,6 @@ static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1335 | smsc911x_tx_writefifo(pdata, (unsigned int *)bufp, wrsz); | 1335 | smsc911x_tx_writefifo(pdata, (unsigned int *)bufp, wrsz); |
1336 | freespace -= (skb->len + 32); | 1336 | freespace -= (skb->len + 32); |
1337 | dev_kfree_skb(skb); | 1337 | dev_kfree_skb(skb); |
1338 | dev->trans_start = jiffies; | ||
1339 | 1338 | ||
1340 | if (unlikely(smsc911x_tx_get_txstatcount(pdata) >= 30)) | 1339 | if (unlikely(smsc911x_tx_get_txstatcount(pdata) >= 30)) |
1341 | smsc911x_tx_update_txcounters(dev); | 1340 | smsc911x_tx_update_txcounters(dev); |
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c index ada05c452175..6cdee6a15f9f 100644 --- a/drivers/net/smsc9420.c +++ b/drivers/net/smsc9420.c | |||
@@ -1034,8 +1034,6 @@ static netdev_tx_t smsc9420_hard_start_xmit(struct sk_buff *skb, | |||
1034 | smsc9420_reg_write(pd, TX_POLL_DEMAND, 1); | 1034 | smsc9420_reg_write(pd, TX_POLL_DEMAND, 1); |
1035 | smsc9420_pci_flush_write(pd); | 1035 | smsc9420_pci_flush_write(pd); |
1036 | 1036 | ||
1037 | dev->trans_start = jiffies; | ||
1038 | |||
1039 | return NETDEV_TX_OK; | 1037 | return NETDEV_TX_OK; |
1040 | } | 1038 | } |
1041 | 1039 | ||
diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c index e5d67327d707..26e25d7f5829 100644 --- a/drivers/net/sonic.c +++ b/drivers/net/sonic.c | |||
@@ -174,7 +174,7 @@ static void sonic_tx_timeout(struct net_device *dev) | |||
174 | /* Try to restart the adaptor. */ | 174 | /* Try to restart the adaptor. */ |
175 | sonic_init(dev); | 175 | sonic_init(dev); |
176 | lp->stats.tx_errors++; | 176 | lp->stats.tx_errors++; |
177 | dev->trans_start = jiffies; | 177 | dev->trans_start = jiffies; /* prevent tx timeout */ |
178 | netif_wake_queue(dev); | 178 | netif_wake_queue(dev); |
179 | } | 179 | } |
180 | 180 | ||
@@ -263,8 +263,6 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
263 | 263 | ||
264 | SONIC_WRITE(SONIC_CMD, SONIC_CR_TXP); | 264 | SONIC_WRITE(SONIC_CMD, SONIC_CR_TXP); |
265 | 265 | ||
266 | dev->trans_start = jiffies; | ||
267 | |||
268 | return NETDEV_TX_OK; | 266 | return NETDEV_TX_OK; |
269 | } | 267 | } |
270 | 268 | ||
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 8a6d27cdc0bd..e19b5a143886 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -1173,7 +1173,7 @@ static void tx_timeout(struct net_device *dev) | |||
1173 | 1173 | ||
1174 | /* Trigger an immediate transmit demand. */ | 1174 | /* Trigger an immediate transmit demand. */ |
1175 | 1175 | ||
1176 | dev->trans_start = jiffies; | 1176 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1177 | np->stats.tx_errors++; | 1177 | np->stats.tx_errors++; |
1178 | netif_wake_queue(dev); | 1178 | netif_wake_queue(dev); |
1179 | } | 1179 | } |
@@ -1312,8 +1312,6 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev) | |||
1312 | if ((np->cur_tx - np->dirty_tx) + 4 > TX_RING_SIZE) | 1312 | if ((np->cur_tx - np->dirty_tx) + 4 > TX_RING_SIZE) |
1313 | netif_stop_queue(dev); | 1313 | netif_stop_queue(dev); |
1314 | 1314 | ||
1315 | dev->trans_start = jiffies; | ||
1316 | |||
1317 | return NETDEV_TX_OK; | 1315 | return NETDEV_TX_OK; |
1318 | } | 1316 | } |
1319 | 1317 | ||
diff --git a/drivers/net/sun3_82586.c b/drivers/net/sun3_82586.c index 31ab4ab0796f..151312342243 100644 --- a/drivers/net/sun3_82586.c +++ b/drivers/net/sun3_82586.c | |||
@@ -985,7 +985,7 @@ static void sun3_82586_timeout(struct net_device *dev) | |||
985 | p->scb->cmd_cuc = CUC_START; | 985 | p->scb->cmd_cuc = CUC_START; |
986 | sun3_attn586(); | 986 | sun3_attn586(); |
987 | WAIT_4_SCB_CMD(); | 987 | WAIT_4_SCB_CMD(); |
988 | dev->trans_start = jiffies; | 988 | dev->trans_start = jiffies; /* prevent tx timeout */ |
989 | return 0; | 989 | return 0; |
990 | } | 990 | } |
991 | #endif | 991 | #endif |
@@ -998,7 +998,7 @@ static void sun3_82586_timeout(struct net_device *dev) | |||
998 | sun3_82586_close(dev); | 998 | sun3_82586_close(dev); |
999 | sun3_82586_open(dev); | 999 | sun3_82586_open(dev); |
1000 | } | 1000 | } |
1001 | dev->trans_start = jiffies; | 1001 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | /****************************************************** | 1004 | /****************************************************** |
@@ -1062,7 +1062,6 @@ static int sun3_82586_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | sun3_attn586(); | 1064 | sun3_attn586(); |
1065 | dev->trans_start = jiffies; | ||
1066 | if(!i) | 1065 | if(!i) |
1067 | dev_kfree_skb(skb); | 1066 | dev_kfree_skb(skb); |
1068 | WAIT_4_SCB_CMD(); | 1067 | WAIT_4_SCB_CMD(); |
@@ -1082,7 +1081,6 @@ static int sun3_82586_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1082 | p->xmit_cmds[0]->cmd_status = p->nop_cmds[next_nop]->cmd_status = 0; | 1081 | p->xmit_cmds[0]->cmd_status = p->nop_cmds[next_nop]->cmd_status = 0; |
1083 | 1082 | ||
1084 | p->nop_cmds[p->nop_point]->cmd_link = make16((p->xmit_cmds[0])); | 1083 | p->nop_cmds[p->nop_point]->cmd_link = make16((p->xmit_cmds[0])); |
1085 | dev->trans_start = jiffies; | ||
1086 | p->nop_point = next_nop; | 1084 | p->nop_point = next_nop; |
1087 | dev_kfree_skb(skb); | 1085 | dev_kfree_skb(skb); |
1088 | # endif | 1086 | # endif |
@@ -1097,7 +1095,6 @@ static int sun3_82586_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1097 | p->nop_cmds[next_nop]->cmd_status = 0; | 1095 | p->nop_cmds[next_nop]->cmd_status = 0; |
1098 | 1096 | ||
1099 | p->nop_cmds[p->xmit_count]->cmd_link = make16((p->xmit_cmds[p->xmit_count])); | 1097 | p->nop_cmds[p->xmit_count]->cmd_link = make16((p->xmit_cmds[p->xmit_count])); |
1100 | dev->trans_start = jiffies; | ||
1101 | p->xmit_count = next_nop; | 1098 | p->xmit_count = next_nop; |
1102 | 1099 | ||
1103 | { | 1100 | { |
diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c index 1694ca5bfb41..358c22f9acbe 100644 --- a/drivers/net/sun3lance.c +++ b/drivers/net/sun3lance.c | |||
@@ -523,8 +523,8 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) | |||
523 | 523 | ||
524 | /* Transmitter timeout, serious problems. */ | 524 | /* Transmitter timeout, serious problems. */ |
525 | if (netif_queue_stopped(dev)) { | 525 | if (netif_queue_stopped(dev)) { |
526 | int tickssofar = jiffies - dev->trans_start; | 526 | int tickssofar = jiffies - dev_trans_start(dev); |
527 | if (tickssofar < 20) | 527 | if (tickssofar < HZ/5) |
528 | return NETDEV_TX_BUSY; | 528 | return NETDEV_TX_BUSY; |
529 | 529 | ||
530 | DPRINTK( 1, ( "%s: transmit timed out, status %04x, resetting.\n", | 530 | DPRINTK( 1, ( "%s: transmit timed out, status %04x, resetting.\n", |
@@ -559,7 +559,6 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) | |||
559 | REGA( CSR0 ) = CSR0_INEA | CSR0_INIT | CSR0_STRT; | 559 | REGA( CSR0 ) = CSR0_INEA | CSR0_INIT | CSR0_STRT; |
560 | 560 | ||
561 | netif_start_queue(dev); | 561 | netif_start_queue(dev); |
562 | dev->trans_start = jiffies; | ||
563 | 562 | ||
564 | return NETDEV_TX_OK; | 563 | return NETDEV_TX_OK; |
565 | } | 564 | } |
@@ -637,8 +636,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) | |||
637 | AREG = CSR0; | 636 | AREG = CSR0; |
638 | DPRINTK( 2, ( "%s: lance_start_xmit() exiting, csr0 %4.4x.\n", | 637 | DPRINTK( 2, ( "%s: lance_start_xmit() exiting, csr0 %4.4x.\n", |
639 | dev->name, DREG )); | 638 | dev->name, DREG )); |
640 | dev->trans_start = jiffies; | 639 | dev_kfree_skb(skb); |
641 | dev_kfree_skb( skb ); | ||
642 | 640 | ||
643 | lp->lock = 0; | 641 | lp->lock = 0; |
644 | if ((MEM->tx_head[(entry+1) & TX_RING_MOD_MASK].flag & TMD1_OWN) == | 642 | if ((MEM->tx_head[(entry+1) & TX_RING_MOD_MASK].flag & TMD1_OWN) == |
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index 52913155ce47..34446b6d9a3c 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
@@ -982,8 +982,6 @@ static int bigmac_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
982 | sbus_writel(CREG_CTRL_TWAKEUP, bp->creg + CREG_CTRL); | 982 | sbus_writel(CREG_CTRL_TWAKEUP, bp->creg + CREG_CTRL); |
983 | 983 | ||
984 | 984 | ||
985 | dev->trans_start = jiffies; | ||
986 | |||
987 | return NETDEV_TX_OK; | 985 | return NETDEV_TX_OK; |
988 | } | 986 | } |
989 | 987 | ||
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index da45f01279c4..16803251a999 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c | |||
@@ -972,7 +972,7 @@ static void tx_timeout(struct net_device *dev) | |||
972 | 972 | ||
973 | dev->if_port = 0; | 973 | dev->if_port = 0; |
974 | 974 | ||
975 | dev->trans_start = jiffies; | 975 | dev->trans_start = jiffies; /* prevent tx timeout */ |
976 | dev->stats.tx_errors++; | 976 | dev->stats.tx_errors++; |
977 | if (np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) { | 977 | if (np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) { |
978 | netif_wake_queue(dev); | 978 | netif_wake_queue(dev); |
@@ -1084,7 +1084,6 @@ start_tx (struct sk_buff *skb, struct net_device *dev) | |||
1084 | } else { | 1084 | } else { |
1085 | netif_stop_queue (dev); | 1085 | netif_stop_queue (dev); |
1086 | } | 1086 | } |
1087 | dev->trans_start = jiffies; | ||
1088 | if (netif_msg_tx_queued(np)) { | 1087 | if (netif_msg_tx_queued(np)) { |
1089 | printk (KERN_DEBUG | 1088 | printk (KERN_DEBUG |
1090 | "%s: Transmit frame #%d queued in slot %d.\n", | 1089 | "%s: Transmit frame #%d queued in slot %d.\n", |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 2b78e97ea9c0..5bc786f73e4d 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -1136,7 +1136,7 @@ static netdev_tx_t gem_start_xmit(struct sk_buff *skb, | |||
1136 | writel(gp->tx_new, gp->regs + TXDMA_KICK); | 1136 | writel(gp->tx_new, gp->regs + TXDMA_KICK); |
1137 | spin_unlock_irqrestore(&gp->tx_lock, flags); | 1137 | spin_unlock_irqrestore(&gp->tx_lock, flags); |
1138 | 1138 | ||
1139 | dev->trans_start = jiffies; | 1139 | dev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */ |
1140 | 1140 | ||
1141 | return NETDEV_TX_OK; | 1141 | return NETDEV_TX_OK; |
1142 | } | 1142 | } |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 982ff12764a3..377c0b51e559 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2341,8 +2341,6 @@ static netdev_tx_t happy_meal_start_xmit(struct sk_buff *skb, | |||
2341 | 2341 | ||
2342 | spin_unlock_irq(&hp->happy_lock); | 2342 | spin_unlock_irq(&hp->happy_lock); |
2343 | 2343 | ||
2344 | dev->trans_start = jiffies; | ||
2345 | |||
2346 | tx_add_log(hp, TXLOG_ACTION_TXMIT, 0); | 2344 | tx_add_log(hp, TXLOG_ACTION_TXMIT, 0); |
2347 | return NETDEV_TX_OK; | 2345 | return NETDEV_TX_OK; |
2348 | } | 2346 | } |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index c7748b73fa09..f88a60fa25f8 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -1003,7 +1003,7 @@ static int lance_reset(struct net_device *dev) | |||
1003 | } | 1003 | } |
1004 | lp->init_ring(dev); | 1004 | lp->init_ring(dev); |
1005 | load_csrs(lp); | 1005 | load_csrs(lp); |
1006 | dev->trans_start = jiffies; | 1006 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1007 | status = init_restart_lance(lp); | 1007 | status = init_restart_lance(lp); |
1008 | return status; | 1008 | return status; |
1009 | } | 1009 | } |
@@ -1160,7 +1160,6 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1160 | 1160 | ||
1161 | spin_unlock_irq(&lp->lock); | 1161 | spin_unlock_irq(&lp->lock); |
1162 | 1162 | ||
1163 | dev->trans_start = jiffies; | ||
1164 | dev_kfree_skb(skb); | 1163 | dev_kfree_skb(skb); |
1165 | 1164 | ||
1166 | return NETDEV_TX_OK; | 1165 | return NETDEV_TX_OK; |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 239f09772191..a7542d25c845 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -602,7 +602,6 @@ static int qe_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
602 | qep->tx_new = NEXT_TX(entry); | 602 | qep->tx_new = NEXT_TX(entry); |
603 | 603 | ||
604 | /* Get it going. */ | 604 | /* Get it going. */ |
605 | dev->trans_start = jiffies; | ||
606 | sbus_writel(CREG_CTRL_TWAKEUP, qep->qcregs + CREG_CTRL); | 605 | sbus_writel(CREG_CTRL_TWAKEUP, qep->qcregs + CREG_CTRL); |
607 | 606 | ||
608 | dev->stats.tx_packets++; | 607 | dev->stats.tx_packets++; |
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c index 6cf8b06be5cd..d281a7b34701 100644 --- a/drivers/net/sunvnet.c +++ b/drivers/net/sunvnet.c | |||
@@ -717,7 +717,6 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
717 | 717 | ||
718 | dev_kfree_skb(skb); | 718 | dev_kfree_skb(skb); |
719 | 719 | ||
720 | dev->trans_start = jiffies; | ||
721 | return NETDEV_TX_OK; | 720 | return NETDEV_TX_OK; |
722 | 721 | ||
723 | out_dropped_unlock: | 722 | out_dropped_unlock: |
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index 36149ddace46..be08b75dbc15 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -1357,8 +1357,6 @@ static int tc35815_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1357 | } | 1357 | } |
1358 | lp->tfd_start = (lp->tfd_start + 1) % TX_FD_NUM; | 1358 | lp->tfd_start = (lp->tfd_start + 1) % TX_FD_NUM; |
1359 | 1359 | ||
1360 | dev->trans_start = jiffies; | ||
1361 | |||
1362 | /* If we just used up the very last entry in the | 1360 | /* If we just used up the very last entry in the |
1363 | * TX ring on this device, tell the queueing | 1361 | * TX ring on this device, tell the queueing |
1364 | * layer to send no more. | 1362 | * layer to send no more. |
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index 8ffec22b74bf..ccee3eddc5f4 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -1034,7 +1034,7 @@ static void TLan_tx_timeout(struct net_device *dev) | |||
1034 | TLan_ResetLists( dev ); | 1034 | TLan_ResetLists( dev ); |
1035 | TLan_ReadAndClearStats( dev, TLAN_IGNORE ); | 1035 | TLan_ReadAndClearStats( dev, TLAN_IGNORE ); |
1036 | TLan_ResetAdapter( dev ); | 1036 | TLan_ResetAdapter( dev ); |
1037 | dev->trans_start = jiffies; | 1037 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1038 | netif_wake_queue( dev ); | 1038 | netif_wake_queue( dev ); |
1039 | 1039 | ||
1040 | } | 1040 | } |
@@ -1147,7 +1147,6 @@ static netdev_tx_t TLan_StartTx( struct sk_buff *skb, struct net_device *dev ) | |||
1147 | 1147 | ||
1148 | CIRC_INC( priv->txTail, TLAN_NUM_TX_LISTS ); | 1148 | CIRC_INC( priv->txTail, TLAN_NUM_TX_LISTS ); |
1149 | 1149 | ||
1150 | dev->trans_start = jiffies; | ||
1151 | return NETDEV_TX_OK; | 1150 | return NETDEV_TX_OK; |
1152 | 1151 | ||
1153 | } /* TLan_StartTx */ | 1152 | } /* TLan_StartTx */ |
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index eebdaae24328..91e6c78271a3 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -1041,7 +1041,6 @@ static netdev_tx_t tok_send_packet(struct sk_buff *skb, | |||
1041 | writew(ti->exsap_station_id, ti->srb + STATION_ID_OFST); | 1041 | writew(ti->exsap_station_id, ti->srb + STATION_ID_OFST); |
1042 | writeb(CMD_IN_SRB, ti->mmio + ACA_OFFSET + ACA_SET + ISRA_ODD); | 1042 | writeb(CMD_IN_SRB, ti->mmio + ACA_OFFSET + ACA_SET + ISRA_ODD); |
1043 | spin_unlock_irqrestore(&(ti->lock), flags); | 1043 | spin_unlock_irqrestore(&(ti->lock), flags); |
1044 | dev->trans_start = jiffies; | ||
1045 | return NETDEV_TX_OK; | 1044 | return NETDEV_TX_OK; |
1046 | } | 1045 | } |
1047 | 1046 | ||
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index e40560137c46..213b9affc22a 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c | |||
@@ -4562,7 +4562,7 @@ static void smctr_timeout(struct net_device *dev) | |||
4562 | * fake transmission time and go on trying. Our own timeout | 4562 | * fake transmission time and go on trying. Our own timeout |
4563 | * routine is in sktr_timer_chk() | 4563 | * routine is in sktr_timer_chk() |
4564 | */ | 4564 | */ |
4565 | dev->trans_start = jiffies; | 4565 | dev->trans_start = jiffies; /* prevent tx timeout */ |
4566 | netif_wake_queue(dev); | 4566 | netif_wake_queue(dev); |
4567 | } | 4567 | } |
4568 | 4568 | ||
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index c169fd05dde0..8cb126a80070 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c | |||
@@ -592,7 +592,7 @@ static void tms380tr_timeout(struct net_device *dev) | |||
592 | * fake transmission time and go on trying. Our own timeout | 592 | * fake transmission time and go on trying. Our own timeout |
593 | * routine is in tms380tr_timer_chk() | 593 | * routine is in tms380tr_timer_chk() |
594 | */ | 594 | */ |
595 | dev->trans_start = jiffies; | 595 | dev->trans_start = jiffies; /* prevent tx timeout */ |
596 | netif_wake_queue(dev); | 596 | netif_wake_queue(dev); |
597 | } | 597 | } |
598 | 598 | ||
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 9c0f29ce8ba7..c0e70006374e 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -654,7 +654,6 @@ static netdev_tx_t de_start_xmit (struct sk_buff *skb, | |||
654 | 654 | ||
655 | /* Trigger an immediate transmit demand. */ | 655 | /* Trigger an immediate transmit demand. */ |
656 | dw32(TxPoll, NormalTxPoll); | 656 | dw32(TxPoll, NormalTxPoll); |
657 | dev->trans_start = jiffies; | ||
658 | 657 | ||
659 | return NETDEV_TX_OK; | 658 | return NETDEV_TX_OK; |
660 | } | 659 | } |
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index d818456f4713..9522baf8d997 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
@@ -1337,7 +1337,7 @@ de4x5_open(struct net_device *dev) | |||
1337 | } | 1337 | } |
1338 | 1338 | ||
1339 | lp->interrupt = UNMASK_INTERRUPTS; | 1339 | lp->interrupt = UNMASK_INTERRUPTS; |
1340 | dev->trans_start = jiffies; | 1340 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1341 | 1341 | ||
1342 | START_DE4X5; | 1342 | START_DE4X5; |
1343 | 1343 | ||
@@ -1507,7 +1507,6 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) | |||
1507 | outl(POLL_DEMAND, DE4X5_TPD);/* Start the TX */ | 1507 | outl(POLL_DEMAND, DE4X5_TPD);/* Start the TX */ |
1508 | 1508 | ||
1509 | lp->tx_new = (++lp->tx_new) % lp->txRingSize; | 1509 | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
1510 | dev->trans_start = jiffies; | ||
1511 | 1510 | ||
1512 | if (TX_BUFFS_AVAIL) { | 1511 | if (TX_BUFFS_AVAIL) { |
1513 | netif_start_queue(dev); /* Another pkt may be queued */ | 1512 | netif_start_queue(dev); /* Another pkt may be queued */ |
@@ -1937,7 +1936,7 @@ set_multicast_list(struct net_device *dev) | |||
1937 | 1936 | ||
1938 | lp->tx_new = (++lp->tx_new) % lp->txRingSize; | 1937 | lp->tx_new = (++lp->tx_new) % lp->txRingSize; |
1939 | outl(POLL_DEMAND, DE4X5_TPD); /* Start the TX */ | 1938 | outl(POLL_DEMAND, DE4X5_TPD); /* Start the TX */ |
1940 | dev->trans_start = jiffies; | 1939 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1941 | } | 1940 | } |
1942 | } | 1941 | } |
1943 | } | 1942 | } |
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index 7278ecb823cb..bdb25b8b1017 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c | |||
@@ -1180,11 +1180,11 @@ static void dmfe_timer(unsigned long data) | |||
1180 | 1180 | ||
1181 | /* TX polling kick monitor */ | 1181 | /* TX polling kick monitor */ |
1182 | if ( db->tx_packet_cnt && | 1182 | if ( db->tx_packet_cnt && |
1183 | time_after(jiffies, dev->trans_start + DMFE_TX_KICK) ) { | 1183 | time_after(jiffies, dev_trans_start(dev) + DMFE_TX_KICK) ) { |
1184 | outl(0x1, dev->base_addr + DCR1); /* Tx polling again */ | 1184 | outl(0x1, dev->base_addr + DCR1); /* Tx polling again */ |
1185 | 1185 | ||
1186 | /* TX Timeout */ | 1186 | /* TX Timeout */ |
1187 | if ( time_after(jiffies, dev->trans_start + DMFE_TX_TIMEOUT) ) { | 1187 | if (time_after(jiffies, dev_trans_start(dev) + DMFE_TX_TIMEOUT) ) { |
1188 | db->reset_TXtimeout++; | 1188 | db->reset_TXtimeout++; |
1189 | db->wait_reset = 1; | 1189 | db->wait_reset = 1; |
1190 | dev_warn(&dev->dev, "Tx timeout - resetting\n"); | 1190 | dev_warn(&dev->dev, "Tx timeout - resetting\n"); |
diff --git a/drivers/net/tulip/pnic.c b/drivers/net/tulip/pnic.c index 966efa1a27d7..a63e64b6863d 100644 --- a/drivers/net/tulip/pnic.c +++ b/drivers/net/tulip/pnic.c | |||
@@ -67,7 +67,7 @@ void pnic_lnk_change(struct net_device *dev, int csr5) | |||
67 | */ | 67 | */ |
68 | if (tulip_media_cap[dev->if_port] & MediaIsMII) | 68 | if (tulip_media_cap[dev->if_port] & MediaIsMII) |
69 | return; | 69 | return; |
70 | if (! tp->nwayset || time_after(jiffies, dev->trans_start + 1*HZ)) { | 70 | if (! tp->nwayset || time_after(jiffies, dev_trans_start(dev) + 1*HZ)) { |
71 | tp->csr6 = 0x00420000 | (tp->csr6 & 0x0000fdff); | 71 | tp->csr6 = 0x00420000 | (tp->csr6 & 0x0000fdff); |
72 | iowrite32(tp->csr6, ioaddr + CSR6); | 72 | iowrite32(tp->csr6, ioaddr + CSR6); |
73 | iowrite32(0x30, ioaddr + CSR12); | 73 | iowrite32(0x30, ioaddr + CSR12); |
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 22e766e90063..254643ed945e 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -605,7 +605,7 @@ static void tulip_tx_timeout(struct net_device *dev) | |||
605 | 605 | ||
606 | out_unlock: | 606 | out_unlock: |
607 | spin_unlock_irqrestore (&tp->lock, flags); | 607 | spin_unlock_irqrestore (&tp->lock, flags); |
608 | dev->trans_start = jiffies; | 608 | dev->trans_start = jiffies; /* prevent tx timeout */ |
609 | netif_wake_queue (dev); | 609 | netif_wake_queue (dev); |
610 | } | 610 | } |
611 | 611 | ||
@@ -707,8 +707,6 @@ tulip_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
707 | 707 | ||
708 | spin_unlock_irqrestore(&tp->lock, flags); | 708 | spin_unlock_irqrestore(&tp->lock, flags); |
709 | 709 | ||
710 | dev->trans_start = jiffies; | ||
711 | |||
712 | return NETDEV_TX_OK; | 710 | return NETDEV_TX_OK; |
713 | } | 711 | } |
714 | 712 | ||
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index c7f972852921..96de5829b940 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c | |||
@@ -1040,11 +1040,11 @@ static void uli526x_timer(unsigned long data) | |||
1040 | 1040 | ||
1041 | /* TX polling kick monitor */ | 1041 | /* TX polling kick monitor */ |
1042 | if ( db->tx_packet_cnt && | 1042 | if ( db->tx_packet_cnt && |
1043 | time_after(jiffies, dev->trans_start + ULI526X_TX_KICK) ) { | 1043 | time_after(jiffies, dev_trans_start(dev) + ULI526X_TX_KICK) ) { |
1044 | outl(0x1, dev->base_addr + DCR1); // Tx polling again | 1044 | outl(0x1, dev->base_addr + DCR1); // Tx polling again |
1045 | 1045 | ||
1046 | // TX Timeout | 1046 | // TX Timeout |
1047 | if ( time_after(jiffies, dev->trans_start + ULI526X_TX_TIMEOUT) ) { | 1047 | if ( time_after(jiffies, dev_trans_start(dev) + ULI526X_TX_TIMEOUT) ) { |
1048 | db->reset_TXtimeout++; | 1048 | db->reset_TXtimeout++; |
1049 | db->wait_reset = 1; | 1049 | db->wait_reset = 1; |
1050 | printk( "%s: Tx timeout - resetting\n", | 1050 | printk( "%s: Tx timeout - resetting\n", |
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 18c8cedf4cac..60a87542f8f0 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -969,7 +969,7 @@ static void tx_timeout(struct net_device *dev) | |||
969 | enable_irq(dev->irq); | 969 | enable_irq(dev->irq); |
970 | 970 | ||
971 | netif_wake_queue(dev); | 971 | netif_wake_queue(dev); |
972 | dev->trans_start = jiffies; | 972 | dev->trans_start = jiffies; /* prevent tx timeout */ |
973 | np->stats.tx_errors++; | 973 | np->stats.tx_errors++; |
974 | return; | 974 | return; |
975 | } | 975 | } |
@@ -1055,8 +1055,6 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev) | |||
1055 | } | 1055 | } |
1056 | spin_unlock_irq(&np->lock); | 1056 | spin_unlock_irq(&np->lock); |
1057 | 1057 | ||
1058 | dev->trans_start = jiffies; | ||
1059 | |||
1060 | if (debug > 4) { | 1058 | if (debug > 4) { |
1061 | printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d\n", | 1059 | printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d\n", |
1062 | dev->name, np->cur_tx, entry); | 1060 | dev->name, np->cur_tx, entry); |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 6b150c072a41..dbdfb1ff7ca0 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -396,7 +396,6 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev) | |||
396 | 396 | ||
397 | /* Enqueue packet */ | 397 | /* Enqueue packet */ |
398 | skb_queue_tail(&tun->socket.sk->sk_receive_queue, skb); | 398 | skb_queue_tail(&tun->socket.sk->sk_receive_queue, skb); |
399 | dev->trans_start = jiffies; | ||
400 | 399 | ||
401 | /* Notify and wake up reader process */ | 400 | /* Notify and wake up reader process */ |
402 | if (tun->flags & TUN_FASYNC) | 401 | if (tun->flags & TUN_FASYNC) |
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index b94c4cce93c2..22bde49262c0 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c | |||
@@ -881,8 +881,6 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev) | |||
881 | wmb(); | 881 | wmb(); |
882 | iowrite32(txRing->lastWrite, tp->tx_ioaddr + txRing->writeRegister); | 882 | iowrite32(txRing->lastWrite, tp->tx_ioaddr + txRing->writeRegister); |
883 | 883 | ||
884 | dev->trans_start = jiffies; | ||
885 | |||
886 | /* If we don't have room to put the worst case packet on the | 884 | /* If we don't have room to put the worst case packet on the |
887 | * queue, then we must stop the queue. We need 2 extra | 885 | * queue, then we must stop the queue. We need 2 extra |
888 | * descriptors -- one to prevent ring wrap, and one for the | 886 | * descriptors -- one to prevent ring wrap, and one for the |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 081f76bff341..932602db54b3 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -3148,8 +3148,6 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3148 | /* set bd status and length */ | 3148 | /* set bd status and length */ |
3149 | out_be32((u32 __iomem *)bd, bd_status); | 3149 | out_be32((u32 __iomem *)bd, bd_status); |
3150 | 3150 | ||
3151 | dev->trans_start = jiffies; | ||
3152 | |||
3153 | /* Move to next BD in the ring */ | 3151 | /* Move to next BD in the ring */ |
3154 | if (!(bd_status & T_W)) | 3152 | if (!(bd_status & T_W)) |
3155 | bd += sizeof(struct qe_bd); | 3153 | bd += sizeof(struct qe_bd); |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index be0cc99e881a..a6227f892d1b 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -834,8 +834,6 @@ static netdev_tx_t hso_net_start_xmit(struct sk_buff *skb, | |||
834 | } else { | 834 | } else { |
835 | net->stats.tx_packets++; | 835 | net->stats.tx_packets++; |
836 | net->stats.tx_bytes += skb->len; | 836 | net->stats.tx_bytes += skb->len; |
837 | /* And tell the kernel when the last transmit started. */ | ||
838 | net->trans_start = jiffies; | ||
839 | } | 837 | } |
840 | dev_kfree_skb(skb); | 838 | dev_kfree_skb(skb); |
841 | /* we're done */ | 839 | /* we're done */ |
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index c4c334d9770f..46890dc625dc 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -856,7 +856,6 @@ skip: | |||
856 | { | 856 | { |
857 | kaweth->stats.tx_packets++; | 857 | kaweth->stats.tx_packets++; |
858 | kaweth->stats.tx_bytes += skb->len; | 858 | kaweth->stats.tx_bytes += skb->len; |
859 | net->trans_start = jiffies; | ||
860 | } | 859 | } |
861 | 860 | ||
862 | spin_unlock_irq(&kaweth->device_lock); | 861 | spin_unlock_irq(&kaweth->device_lock); |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 41838773b568..1cd17d274a12 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -808,7 +808,7 @@ static void write_bulk_callback(struct urb *urb) | |||
808 | break; | 808 | break; |
809 | } | 809 | } |
810 | 810 | ||
811 | net->trans_start = jiffies; | 811 | net->trans_start = jiffies; /* prevent tx timeout */ |
812 | netif_wake_queue(net); | 812 | netif_wake_queue(net); |
813 | } | 813 | } |
814 | 814 | ||
@@ -909,7 +909,6 @@ static netdev_tx_t pegasus_start_xmit(struct sk_buff *skb, | |||
909 | } else { | 909 | } else { |
910 | pegasus->stats.tx_packets++; | 910 | pegasus->stats.tx_packets++; |
911 | pegasus->stats.tx_bytes += skb->len; | 911 | pegasus->stats.tx_bytes += skb->len; |
912 | net->trans_start = jiffies; | ||
913 | } | 912 | } |
914 | dev_kfree_skb(skb); | 913 | dev_kfree_skb(skb); |
915 | 914 | ||
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index 467bcff13cd0..4930f9dbc493 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
@@ -1209,7 +1209,7 @@ static void rhine_reset_task(struct work_struct *work) | |||
1209 | spin_unlock_bh(&rp->lock); | 1209 | spin_unlock_bh(&rp->lock); |
1210 | enable_irq(rp->pdev->irq); | 1210 | enable_irq(rp->pdev->irq); |
1211 | 1211 | ||
1212 | dev->trans_start = jiffies; | 1212 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1213 | dev->stats.tx_errors++; | 1213 | dev->stats.tx_errors++; |
1214 | netif_wake_queue(dev); | 1214 | netif_wake_queue(dev); |
1215 | } | 1215 | } |
@@ -1294,8 +1294,6 @@ static netdev_tx_t rhine_start_tx(struct sk_buff *skb, | |||
1294 | if (rp->cur_tx == rp->dirty_tx + TX_QUEUE_LEN) | 1294 | if (rp->cur_tx == rp->dirty_tx + TX_QUEUE_LEN) |
1295 | netif_stop_queue(dev); | 1295 | netif_stop_queue(dev); |
1296 | 1296 | ||
1297 | dev->trans_start = jiffies; | ||
1298 | |||
1299 | spin_unlock_irqrestore(&rp->lock, flags); | 1297 | spin_unlock_irqrestore(&rp->lock, flags); |
1300 | 1298 | ||
1301 | if (debug > 4) { | 1299 | if (debug > 4) { |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 616f8c92b745..42dffd3e5795 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -2606,7 +2606,6 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb, | |||
2606 | td_ptr->td_buf[0].size |= TD_QUEUE; | 2606 | td_ptr->td_buf[0].size |= TD_QUEUE; |
2607 | mac_tx_queue_wake(vptr->mac_regs, qnum); | 2607 | mac_tx_queue_wake(vptr->mac_regs, qnum); |
2608 | 2608 | ||
2609 | dev->trans_start = jiffies; | ||
2610 | spin_unlock_irqrestore(&vptr->lock, flags); | 2609 | spin_unlock_irqrestore(&vptr->lock, flags); |
2611 | out: | 2610 | out: |
2612 | return NETDEV_TX_OK; | 2611 | return NETDEV_TX_OK; |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 90e783a09245..39462321f5fb 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -992,7 +992,6 @@ vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
992 | VMXNET3_WRITE_BAR0_REG(adapter, VMXNET3_REG_TXPROD, | 992 | VMXNET3_WRITE_BAR0_REG(adapter, VMXNET3_REG_TXPROD, |
993 | tq->tx_ring.next2fill); | 993 | tq->tx_ring.next2fill); |
994 | } | 994 | } |
995 | netdev->trans_start = jiffies; | ||
996 | 995 | ||
997 | return NETDEV_TX_OK; | 996 | return NETDEV_TX_OK; |
998 | 997 | ||
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index a4859f7a7cc0..d45b08d1dbc9 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c | |||
@@ -1175,8 +1175,6 @@ static netdev_tx_t dscc4_start_xmit(struct sk_buff *skb, | |||
1175 | spin_unlock(&dpriv->lock); | 1175 | spin_unlock(&dpriv->lock); |
1176 | #endif | 1176 | #endif |
1177 | 1177 | ||
1178 | dev->trans_start = jiffies; | ||
1179 | |||
1180 | if (debug > 2) | 1178 | if (debug > 2) |
1181 | dscc4_tx_print(dev, dpriv, "Xmit"); | 1179 | dscc4_tx_print(dev, dpriv, "Xmit"); |
1182 | /* To be cleaned(unsigned int)/optimized. Later, ok ? */ | 1180 | /* To be cleaned(unsigned int)/optimized. Later, ok ? */ |
diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c index 4dde2ea4a189..a3ea27ce04f2 100644 --- a/drivers/net/wan/hd64570.c +++ b/drivers/net/wan/hd64570.c | |||
@@ -658,7 +658,6 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) | |||
658 | #endif | 658 | #endif |
659 | writew(len, &desc->len); | 659 | writew(len, &desc->len); |
660 | writeb(ST_TX_EOM, &desc->stat); | 660 | writeb(ST_TX_EOM, &desc->stat); |
661 | dev->trans_start = jiffies; | ||
662 | 661 | ||
663 | port->txin = next_desc(port, port->txin, 1); | 662 | port->txin = next_desc(port, port->txin, 1); |
664 | sca_outw(desc_offset(port, port->txin, 1), | 663 | sca_outw(desc_offset(port, port->txin, 1), |
diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c index aad9ed45c254..ea476cbd38b5 100644 --- a/drivers/net/wan/hd64572.c +++ b/drivers/net/wan/hd64572.c | |||
@@ -585,7 +585,6 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) | |||
585 | 585 | ||
586 | writew(len, &desc->len); | 586 | writew(len, &desc->len); |
587 | writeb(ST_TX_EOM, &desc->stat); | 587 | writeb(ST_TX_EOM, &desc->stat); |
588 | dev->trans_start = jiffies; | ||
589 | 588 | ||
590 | port->txin = (port->txin + 1) % card->tx_ring_buffers; | 589 | port->txin = (port->txin + 1) % card->tx_ring_buffers; |
591 | sca_outl(desc_offset(port, port->txin, 1), | 590 | sca_outl(desc_offset(port, port->txin, 1), |
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index 0c2cdde686a0..88e363033e23 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c | |||
@@ -891,7 +891,6 @@ static int hss_hdlc_xmit(struct sk_buff *skb, struct net_device *dev) | |||
891 | 891 | ||
892 | wmb(); | 892 | wmb(); |
893 | queue_put_desc(queue_ids[port->id].tx, tx_desc_phys(port, n), desc); | 893 | queue_put_desc(queue_ids[port->id].tx, tx_desc_phys(port, n), desc); |
894 | dev->trans_start = jiffies; | ||
895 | 894 | ||
896 | if (qmgr_stat_below_low_watermark(txreadyq)) { /* empty */ | 895 | if (qmgr_stat_below_low_watermark(txreadyq)) { /* empty */ |
897 | #if DEBUG_TX | 896 | #if DEBUG_TX |
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index b27850377121..e2c6f7f4f51c 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 | ||
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index 17502d80b65a..c6aa66e5b52f 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c | |||
@@ -1790,7 +1790,7 @@ static void cpc_tx_timeout(struct net_device *dev) | |||
1790 | cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) & | 1790 | cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) & |
1791 | ~(CPLD_REG2_FALC_LED1 << (2 * ch))); | 1791 | ~(CPLD_REG2_FALC_LED1 << (2 * ch))); |
1792 | } | 1792 | } |
1793 | dev->trans_start = jiffies; | 1793 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1794 | CPC_UNLOCK(card, flags); | 1794 | CPC_UNLOCK(card, flags); |
1795 | netif_wake_queue(dev); | 1795 | netif_wake_queue(dev); |
1796 | } | 1796 | } |
@@ -1849,7 +1849,6 @@ static int cpc_queue_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1849 | if (d->trace_on) { | 1849 | if (d->trace_on) { |
1850 | cpc_trace(dev, skb, 'T'); | 1850 | cpc_trace(dev, skb, 'T'); |
1851 | } | 1851 | } |
1852 | dev->trans_start = jiffies; | ||
1853 | 1852 | ||
1854 | /* Start transmission */ | 1853 | /* Start transmission */ |
1855 | CPC_LOCK(card, flags); | 1854 | CPC_LOCK(card, flags); |
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 541c700dceef..db73a7be199f 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c | |||
@@ -298,7 +298,6 @@ static netdev_tx_t wanxl_xmit(struct sk_buff *skb, struct net_device *dev) | |||
298 | desc->stat = PACKET_FULL; | 298 | desc->stat = PACKET_FULL; |
299 | writel(1 << (DOORBELL_TO_CARD_TX_0 + port->node), | 299 | writel(1 << (DOORBELL_TO_CARD_TX_0 + port->node), |
300 | port->card->plx + PLX_DOORBELL_TO_CARD); | 300 | port->card->plx + PLX_DOORBELL_TO_CARD); |
301 | dev->trans_start = jiffies; | ||
302 | 301 | ||
303 | port->tx_out = (port->tx_out + 1) % TX_BUFFERS; | 302 | port->tx_out = (port->tx_out + 1) % TX_BUFFERS; |
304 | 303 | ||
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 3edbbcf0f548..c8f7090b27d3 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -865,7 +865,6 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev) | |||
865 | 865 | ||
866 | /* low bit of first byte of destination tells us if broadcast */ | 866 | /* low bit of first byte of destination tells us if broadcast */ |
867 | tx_update_descriptor(priv, *(skb->data) & 0x01, len + 18, buff, TX_PACKET_TYPE_DATA); | 867 | tx_update_descriptor(priv, *(skb->data) & 0x01, len + 18, buff, TX_PACKET_TYPE_DATA); |
868 | dev->trans_start = jiffies; | ||
869 | dev->stats.tx_bytes += len; | 868 | dev->stats.tx_bytes += len; |
870 | 869 | ||
871 | spin_unlock_irqrestore(&priv->irqlock, flags); | 870 | spin_unlock_irqrestore(&priv->irqlock, flags); |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 38edad6f24b8..d9b8ee130c45 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -229,7 +229,7 @@ static void lbs_tx_timeout(struct net_device *dev) | |||
229 | 229 | ||
230 | lbs_pr_err("tx watch dog timeout\n"); | 230 | lbs_pr_err("tx watch dog timeout\n"); |
231 | 231 | ||
232 | dev->trans_start = jiffies; | 232 | dev->trans_start = jiffies; /* prevent tx timeout */ |
233 | 233 | ||
234 | if (priv->currenttxskb) | 234 | if (priv->currenttxskb) |
235 | lbs_send_tx_feedback(priv, 0); | 235 | lbs_send_tx_feedback(priv, 0); |
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c index 52d244ea3d97..a9bf658659eb 100644 --- a/drivers/net/wireless/libertas/tx.c +++ b/drivers/net/wireless/libertas/tx.c | |||
@@ -147,8 +147,6 @@ netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
147 | dev->stats.tx_packets++; | 147 | dev->stats.tx_packets++; |
148 | dev->stats.tx_bytes += skb->len; | 148 | dev->stats.tx_bytes += skb->len; |
149 | 149 | ||
150 | dev->trans_start = jiffies; | ||
151 | |||
152 | if (priv->monitormode) { | 150 | if (priv->monitormode) { |
153 | /* Keep the skb to echo it back once Tx feedback is | 151 | /* Keep the skb to echo it back once Tx feedback is |
154 | received from FW */ | 152 | received from FW */ |
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index 1d60c7e4392a..884a7779fc5f 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
@@ -517,7 +517,6 @@ static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
517 | goto busy; | 517 | goto busy; |
518 | } | 518 | } |
519 | 519 | ||
520 | dev->trans_start = jiffies; | ||
521 | stats->tx_bytes += HERMES_802_3_OFFSET + skb->len; | 520 | stats->tx_bytes += HERMES_802_3_OFFSET + skb->len; |
522 | goto ok; | 521 | goto ok; |
523 | 522 | ||
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index 64585da8a96c..2fc52bc2d7dd 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c | |||
@@ -224,8 +224,6 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) | |||
224 | priv->data_low_tx_full = 1; | 224 | priv->data_low_tx_full = 1; |
225 | } | 225 | } |
226 | 226 | ||
227 | /* set the transmission time */ | ||
228 | ndev->trans_start = jiffies; | ||
229 | ndev->stats.tx_packets++; | 227 | ndev->stats.tx_packets++; |
230 | ndev->stats.tx_bytes += skb->len; | 228 | ndev->stats.tx_bytes += skb->len; |
231 | 229 | ||
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index d9c45bfcee61..73972ee76540 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -941,7 +941,6 @@ static netdev_tx_t ray_dev_start_xmit(struct sk_buff *skb, | |||
941 | case XMIT_MSG_BAD: | 941 | case XMIT_MSG_BAD: |
942 | case XMIT_OK: | 942 | case XMIT_OK: |
943 | default: | 943 | default: |
944 | dev->trans_start = jiffies; | ||
945 | dev_kfree_skb(skb); | 944 | dev_kfree_skb(skb); |
946 | } | 945 | } |
947 | 946 | ||
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 65dd502eab0d..1e61e6cace90 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -1307,7 +1307,7 @@ static void wl3501_tx_timeout(struct net_device *dev) | |||
1307 | printk(KERN_ERR "%s: Error %d resetting card on Tx timeout!\n", | 1307 | printk(KERN_ERR "%s: Error %d resetting card on Tx timeout!\n", |
1308 | dev->name, rc); | 1308 | dev->name, rc); |
1309 | else { | 1309 | else { |
1310 | dev->trans_start = jiffies; | 1310 | dev->trans_start = jiffies; /* prevent tx timeout */ |
1311 | netif_wake_queue(dev); | 1311 | netif_wake_queue(dev); |
1312 | } | 1312 | } |
1313 | } | 1313 | } |
@@ -1326,7 +1326,6 @@ static netdev_tx_t wl3501_hard_start_xmit(struct sk_buff *skb, | |||
1326 | 1326 | ||
1327 | spin_lock_irqsave(&this->lock, flags); | 1327 | spin_lock_irqsave(&this->lock, flags); |
1328 | enabled = wl3501_block_interrupt(this); | 1328 | enabled = wl3501_block_interrupt(this); |
1329 | dev->trans_start = jiffies; | ||
1330 | rc = wl3501_send_pkt(this, skb->data, skb->len); | 1329 | rc = wl3501_send_pkt(this, skb->data, skb->len); |
1331 | if (enabled) | 1330 | if (enabled) |
1332 | wl3501_unblock_interrupt(this); | 1331 | wl3501_unblock_interrupt(this); |
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 1e2b684f8ed4..ece86a5d3355 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
@@ -827,7 +827,6 @@ static netdev_tx_t zd1201_hard_start_xmit(struct sk_buff *skb, | |||
827 | } else { | 827 | } else { |
828 | dev->stats.tx_packets++; | 828 | dev->stats.tx_packets++; |
829 | dev->stats.tx_bytes += skb->len; | 829 | dev->stats.tx_bytes += skb->len; |
830 | dev->trans_start = jiffies; | ||
831 | } | 830 | } |
832 | kfree_skb(skb); | 831 | kfree_skb(skb); |
833 | 832 | ||
@@ -845,7 +844,7 @@ static void zd1201_tx_timeout(struct net_device *dev) | |||
845 | usb_unlink_urb(zd->tx_urb); | 844 | usb_unlink_urb(zd->tx_urb); |
846 | dev->stats.tx_errors++; | 845 | dev->stats.tx_errors++; |
847 | /* Restart the timeout to quiet the watchdog: */ | 846 | /* Restart the timeout to quiet the watchdog: */ |
848 | dev->trans_start = jiffies; | 847 | dev->trans_start = jiffies; /* prevent tx timeout */ |
849 | } | 848 | } |
850 | 849 | ||
851 | static int zd1201_set_mac_address(struct net_device *dev, void *p) | 850 | static int zd1201_set_mac_address(struct net_device *dev, void *p) |
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 93828d565390..a7db68d37ee9 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c | |||
@@ -558,7 +558,7 @@ static void xemaclite_tx_timeout(struct net_device *dev) | |||
558 | } | 558 | } |
559 | 559 | ||
560 | /* To exclude tx timeout */ | 560 | /* To exclude tx timeout */ |
561 | dev->trans_start = 0xffffffff - TX_TIMEOUT - TX_TIMEOUT; | 561 | dev->trans_start = jiffies; /* prevent tx timeout */ |
562 | 562 | ||
563 | /* We're all ready to go. Start the queue */ | 563 | /* We're all ready to go. Start the queue */ |
564 | netif_wake_queue(dev); | 564 | netif_wake_queue(dev); |
@@ -590,7 +590,7 @@ static void xemaclite_tx_handler(struct net_device *dev) | |||
590 | dev->stats.tx_bytes += lp->deferred_skb->len; | 590 | dev->stats.tx_bytes += lp->deferred_skb->len; |
591 | dev_kfree_skb_irq(lp->deferred_skb); | 591 | dev_kfree_skb_irq(lp->deferred_skb); |
592 | lp->deferred_skb = NULL; | 592 | lp->deferred_skb = NULL; |
593 | dev->trans_start = jiffies; | 593 | dev->trans_start = jiffies; /* prevent tx timeout */ |
594 | netif_wake_queue(dev); | 594 | netif_wake_queue(dev); |
595 | } | 595 | } |
596 | } | 596 | } |
@@ -1054,7 +1054,6 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) | |||
1054 | 1054 | ||
1055 | dev->stats.tx_bytes += len; | 1055 | dev->stats.tx_bytes += len; |
1056 | dev_kfree_skb(new_skb); | 1056 | dev_kfree_skb(new_skb); |
1057 | dev->trans_start = jiffies; | ||
1058 | 1057 | ||
1059 | return 0; | 1058 | return 0; |
1060 | } | 1059 | } |
diff --git a/drivers/net/znet.c b/drivers/net/znet.c index dbfef8d70f2d..b9fd2f0cdd3d 100644 --- a/drivers/net/znet.c +++ b/drivers/net/znet.c | |||
@@ -587,7 +587,6 @@ static netdev_tx_t znet_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
587 | } | 587 | } |
588 | spin_unlock_irqrestore (&znet->lock, flags); | 588 | spin_unlock_irqrestore (&znet->lock, flags); |
589 | 589 | ||
590 | dev->trans_start = jiffies; | ||
591 | netif_start_queue (dev); | 590 | netif_start_queue (dev); |
592 | 591 | ||
593 | if (znet_debug > 4) | 592 | if (znet_debug > 4) |