Commit 4a2712b2 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by David S. Miller

ftgmac100: Move the barrier out of ftgmac100_txdes_set_dma_own()

We'll use variants of this accessor without barriers when
building series of descriptors for fragmented sends
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6ad3d7ed
...@@ -485,11 +485,6 @@ static bool ftgmac100_txdes_owned_by_dma(struct ftgmac100_txdes *txdes) ...@@ -485,11 +485,6 @@ static bool ftgmac100_txdes_owned_by_dma(struct ftgmac100_txdes *txdes)
static void ftgmac100_txdes_set_dma_own(struct ftgmac100_txdes *txdes) static void ftgmac100_txdes_set_dma_own(struct ftgmac100_txdes *txdes)
{ {
/*
* Make sure dma own bit will not be set before any other
* descriptor fields.
*/
wmb();
txdes->txdes0 |= cpu_to_le32(FTGMAC100_TXDES0_TXDMA_OWN); txdes->txdes0 |= cpu_to_le32(FTGMAC100_TXDES0_TXDMA_OWN);
} }
...@@ -679,6 +674,10 @@ static int ftgmac100_hard_start_xmit(struct sk_buff *skb, ...@@ -679,6 +674,10 @@ static int ftgmac100_hard_start_xmit(struct sk_buff *skb,
} }
} }
/* Order the previous packet and descriptor udpates
* before setting the OWN bit.
*/
dma_wmb();
ftgmac100_txdes_set_dma_own(txdes); ftgmac100_txdes_set_dma_own(txdes);
/* Update next TX pointer */ /* Update next TX pointer */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment