summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorSrikanth Thokala <sthokal@xilinx.com>2013-12-07 13:40:49 +0530
committerDavid S. Miller <davem@davemloft.net>2013-12-09 21:02:25 -0500
commitec21b6b404dd850a23952ee3b871ff676c0703fa (patch)
tree59d076a2697c3e3d438a4ef24755c58cf278d30d /drivers/net
parent243fedd5fa4a4a72caae7bde3f0bd0354a256b88 (diff)
downloadblackbird-op-linux-ec21b6b404dd850a23952ee3b871ff676c0703fa.tar.gz
blackbird-op-linux-ec21b6b404dd850a23952ee3b871ff676c0703fa.zip
net: emaclite: add barriers to support Xilinx Zynq platform
This patch adds barriers at appropriate places to ensure the driver works on Xilinx Zynq ARM-based SoC platform. Signed-off-by: Srikanth Thokala <sthokal@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_emaclite.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index b2850fdb517e..fefb8cd5eb65 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -220,6 +220,13 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
*to_u16_ptr++ = *from_u16_ptr++;
*to_u16_ptr++ = *from_u16_ptr++;
+ /* This barrier resolves occasional issues seen around
+ * cases where the data is not properly flushed out
+ * from the processor store buffers to the destination
+ * memory locations.
+ */
+ wmb();
+
/* Output a word */
*to_u32_ptr++ = align_buffer;
}
@@ -235,6 +242,12 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
for (; length > 0; length--)
*to_u8_ptr++ = *from_u8_ptr++;
+ /* This barrier resolves occasional issues seen around
+ * cases where the data is not properly flushed out
+ * from the processor store buffers to the destination
+ * memory locations.
+ */
+ wmb();
*to_u32_ptr = align_buffer;
}
}
OpenPOWER on IntegriCloud