aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arm
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-05-10 08:01:31 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-10 08:01:31 -0400
commit1ae5dc342ac78d7a42965fd1f323815f6f5ef2c1 (patch)
treed1955a7639e99832590df26466a34d5786a880ae /drivers/net/arm
parent2b0b05ddc04b6d45e71cd36405df512075786f1e (diff)
net: trans_start cleanups
Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/arm')
-rw-r--r--drivers/net/arm/am79c961a.c1
-rw-r--r--drivers/net/arm/at91_ether.c1
-rw-r--r--drivers/net/arm/ep93xx_eth.c2
-rw-r--r--drivers/net/arm/ether1.c1
-rw-r--r--drivers/net/arm/ether3.c1
-rw-r--r--drivers/net/arm/ixp4xx_eth.c1
-rw-r--r--drivers/net/arm/ks8695net.c2
-rw-r--r--drivers/net/arm/w90p910_ether.c6
8 files changed, 2 insertions, 13 deletions
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 = &ether->tdesc->desclist[ether->cur_tx]; 635 txbd = &ether->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