We'll use variants of this accessor without barriers when
building series of descriptors for fragmented sends
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
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);
}
}
}
+ /* Order the previous packet and descriptor udpates
+ * before setting the OWN bit.
+ */
+ dma_wmb();
ftgmac100_txdes_set_dma_own(txdes);
/* Update next TX pointer */