Patchwork [3/7] tg3: fix race in transmit time stamping.

login
register
mail settings
Submitter Richard Cochran
Date June 19, 2011, 1:31 p.m.
Message ID <3028b6650f99e6581e1afbf810dc7fcc4be6941e.1308489767.git.richard.cochran@omicron.at>
Download mbox | patch
Permalink /patch/100961/
State Accepted
Delegated to: David Miller
Headers show

Comments

Richard Cochran - June 19, 2011, 1:31 p.m.
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
 drivers/net/tg3.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 743d997..34ea37d 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -6088,11 +6088,11 @@  static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		entry = NEXT_TX(tnapi->tx_prod);
 	}
 
+	skb_tx_timestamp(skb);
+
 	/* Packets are ready, update Tx producer idx local and on card. */
 	tw32_tx_mbox(tnapi->prodmbox, entry);
 
-	skb_tx_timestamp(skb);
-
 	tnapi->tx_prod = entry;
 	if (unlikely(tg3_tx_avail(tnapi) <= (MAX_SKB_FRAGS + 1))) {
 		netif_tx_stop_queue(txq);