diff options
author | Pavel Machek <pavel@ucw.cz> | 2016-12-18 21:38:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-19 11:05:02 -0500 |
commit | ad688cdbb076833ba17fc65591cd0fe01900a5cf (patch) | |
tree | 0b36819266511a2dcacef21c8f42000ed88afaa0 /drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | |
parent | net: ethernet: cavium: octeon: octeon_mgmt: Handle return NULL error from devm_ioremap (diff) | |
download | linux-dev-ad688cdbb076833ba17fc65591cd0fe01900a5cf.tar.xz linux-dev-ad688cdbb076833ba17fc65591cd0fe01900a5cf.zip |
stmmac: fix memory barriers
Fix up memory barriers in stmmac driver. They are meant to protect
against DMA engine, so smp_ variants are certainly wrong, and dma_
variants are preferable.
Signed-off-by: Pavel Machek <pavel@denx.de>
Tested-by: Niklas Cassel <niklas.cassel@axis.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c index a340fc8bd0de..8816515e1bbb 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c @@ -334,7 +334,7 @@ static void dwmac4_rd_prepare_tx_desc(struct dma_desc *p, int is_fs, int len, * descriptors for the same frame has to be set before, to * avoid race condition. */ - wmb(); + dma_wmb(); p->des3 = cpu_to_le32(tdes3); } @@ -377,7 +377,7 @@ static void dwmac4_rd_prepare_tso_tx_desc(struct dma_desc *p, int is_fs, * descriptors for the same frame has to be set before, to * avoid race condition. */ - wmb(); + dma_wmb(); p->des3 = cpu_to_le32(tdes3); } |