Netdev List
 help / color / mirror / Atom feed
* [PATCH 1/5] ucc_geth: Reduce IRQ off in xmit path
@ 2012-09-18 16:56 Joakim Tjernlund
  2012-09-18 16:56 ` [PATCH 2/5] ucc_geth: Word align Ethernet RX data Joakim Tjernlund
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Joakim Tjernlund @ 2012-09-18 16:56 UTC (permalink / raw)
  To: netdev; +Cc: Joakim Tjernlund

Currently ucc_geth_start_xmit wraps IRQ off for the
whole body just to be safe.
Reduce the IRQ off period to a minimum.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
 drivers/net/ethernet/freescale/ucc_geth.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index 9ac14f8..e609c93 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -3181,8 +3181,6 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	ugeth_vdbg("%s: IN", __func__);
 
-	spin_lock_irqsave(&ugeth->lock, flags);
-
 	dev->stats.tx_bytes += skb->len;
 
 	/* Start from the next BD that should be filled */
@@ -3196,6 +3194,7 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	    (ugeth->skb_curtx[txQ] +
 	     1) & TX_RING_MOD_MASK(ugeth->ug_info->bdRingLenTx[txQ]);
 
+	spin_lock_irqsave(&ugeth->lock, flags);
 	/* set up the buffer descriptor */
 	out_be32(&((struct qe_bd __iomem *)bd)->buf,
 		      dma_map_single(ugeth->dev, skb->data,
@@ -3207,6 +3206,8 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	/* set bd status and length */
 	out_be32((u32 __iomem *)bd, bd_status);
+	spin_unlock_irqrestore(&ugeth->lock, flags);
+
 
 	/* Move to next BD in the ring */
 	if (!(bd_status & T_W))
@@ -3238,8 +3239,6 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	uccf = ugeth->uccf;
 	out_be16(uccf->p_utodr, UCC_FAST_TOD);
 #endif
-	spin_unlock_irqrestore(&ugeth->lock, flags);
-
 	return NETDEV_TX_OK;
 }
 
-- 
1.7.8.6

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-10-03 20:13 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-18 16:56 [PATCH 1/5] ucc_geth: Reduce IRQ off in xmit path Joakim Tjernlund
2012-09-18 16:56 ` [PATCH 2/5] ucc_geth: Word align Ethernet RX data Joakim Tjernlund
2012-10-03 13:17   ` Joakim Tjernlund
2012-09-18 16:56 ` [PATCH 3/5] ucc_geth: Fix two gcc warnings Joakim Tjernlund
2012-10-03 13:17   ` Joakim Tjernlund
2012-09-18 16:56 ` [PATCH 4/5] ucc_geth: Increase RX ring buffer from 32 to 64 Joakim Tjernlund
2012-10-03 13:17   ` Joakim Tjernlund
2012-10-03 19:38     ` David Miller
2012-10-03 20:13       ` Joakim Tjernlund
2012-09-18 16:56 ` [PATCH 5/5] ucc_geth: Add IRQ coalescing Joakim Tjernlund
2012-10-03 13:18   ` Joakim Tjernlund
2012-09-18 22:39 ` [PATCH 1/5] ucc_geth: Reduce IRQ off in xmit path Francois Romieu
2012-09-19  7:36   ` Joakim Tjernlund
2012-09-19 22:34 ` Francois Romieu
2012-09-20  8:06   ` Joakim Tjernlund
2012-09-20  8:17   ` [PATCH v2] " Joakim Tjernlund
2012-09-20 21:08     ` David Miller
2012-09-21  9:00       ` Joakim Tjernlund
2012-09-21  9:11     ` [PATCH v3] ucc_geth: Lockless xmit Joakim Tjernlund
2012-09-21 12:51       ` Francois Romieu
     [not found]         ` <OF6B2AFF0B.1C979828-ONC1257A80.00502DCF-C1257A80.00509C7E@LocalDomain>
     [not found]           ` <OF53C63B27.8D5BE7C3-ONC1257A80.00575156-C1257A80.005766FC@transmode.se>
     [not found]             ` <20120921173535.GA27934@electric-eye.fr.zoreil.com>
2012-09-23  9:39               ` Joakim Tjernlund
2012-09-24 21:10                 ` Francois Romieu
2012-09-25 14:09                   ` Joakim Tjernlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox