From: Richard Cochran Date: Sun, 19 Jun 2011 03:31:41 +0000 (+0000) Subject: tg3: fix race in transmit time stamping. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d515b450bfd50d355c5b3230685b997faeee5c49;p=openwrt%2Fstaging%2Fblogic.git tg3: fix race in transmit time stamping. Signed-off-by: Richard Cochran Signed-off-by: David S. Miller --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index ca6687a94225..97cd02d08021 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -6119,11 +6119,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);