From 5bf0c1913498e55f1bf4c56fef6dacf2feb049bb Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 19 Jun 2011 03:31:45 +0000 Subject: [PATCH] davinci_emac: fix race in transmit time stamping. Signed-off-by: Richard Cochran Signed-off-by: David S. Miller --- drivers/net/davinci_emac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index f5688ff58a4..55c8245b0cd 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -1083,6 +1083,8 @@ static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev) goto fail_tx; } + skb_tx_timestamp(skb); + ret_code = cpdma_chan_submit(priv->txchan, skb, skb->data, skb->len, GFP_KERNEL); if (unlikely(ret_code != 0)) { @@ -1090,7 +1092,6 @@ static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev) dev_err(emac_dev, "DaVinci EMAC: desc submit failed"); goto fail_tx; } - skb_tx_timestamp(skb); return NETDEV_TX_OK; -- 2.39.5