Skip to content

Commit ec21b6b

Browse files
sthokaldavem330
authored andcommitted
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>
1 parent 243fedd commit ec21b6b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎drivers/net/ethernet/xilinx/xilinx_emaclite.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,13 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
220220
*to_u16_ptr++ = *from_u16_ptr++;
221221
*to_u16_ptr++ = *from_u16_ptr++;
222222

223+
/* This barrier resolves occasional issues seen around
224+
* cases where the data is not properly flushed out
225+
* from the processor store buffers to the destination
226+
* memory locations.
227+
*/
228+
wmb();
229+
223230
/* Output a word */
224231
*to_u32_ptr++ = align_buffer;
225232
}
@@ -235,6 +242,12 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
235242
for (; length > 0; length--)
236243
*to_u8_ptr++ = *from_u8_ptr++;
237244

245+
/* This barrier resolves occasional issues seen around
246+
* cases where the data is not properly flushed out
247+
* from the processor store buffers to the destination
248+
* memory locations.
249+
*/
250+
wmb();
238251
*to_u32_ptr = align_buffer;
239252
}
240253
}

0 commit comments

Comments
 (0)