Patchwork [6/7] smsc9420: fix race in transmit time stamping.

login
register
mail settings
Submitter Richard Cochran
Date June 19, 2011, 1:31 p.m.
Message ID <8c48b912d467657cd5bd338042d68a9715623cf6.1308489767.git.richard.cochran@omicron.at>
Download mbox | patch
Permalink /patch/100965/
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/smsc9420.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c
index 2d84f92..ae4d60a 100644
--- a/drivers/net/smsc9420.c
+++ b/drivers/net/smsc9420.c
@@ -1030,12 +1030,12 @@  static netdev_tx_t smsc9420_hard_start_xmit(struct sk_buff *skb,
 	pd->tx_ring[index].status = TDES0_OWN_;
 	wmb();
 
+	skb_tx_timestamp(skb);
+
 	/* kick the DMA */
 	smsc9420_reg_write(pd, TX_POLL_DEMAND, 1);
 	smsc9420_pci_flush_write(pd);
 
-	skb_tx_timestamp(skb);
-
 	return NETDEV_TX_OK;
 }