]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: dwc_eth_qos: Invalidate RX packet DMA buffer
authorMarek Vasut <marex@denx.de>
Mon, 23 Mar 2020 01:09:55 +0000 (02:09 +0100)
committermarex <marex@desktop.lan>
Fri, 1 May 2020 10:35:21 +0000 (12:35 +0200)
commita83ca0c280dd41dda576d6a8f15a8534a84b782c
tree4d782b7b1a2f247d3a0b803bb69b2e8ca4710eca
parent738ee270fe17ea9e48fee8823eb356ed03656e7c
net: dwc_eth_qos: Invalidate RX packet DMA buffer

This patch prevents an issue where the RX packet might have been
accessed by the CPU, which now has cached data from the packet in
the caches and possibly various write buffers, and these data may
be evicted from the caches into the DRAM while the buffer is also
written by the DMA.

By invalidating the buffer after the CPU accessed it and before the
DMA populates the buffer, it is assured that the buffer will not be
corrupted.

Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Stephen Warren <swarren@nvidia.com>
drivers/net/dwc_eth_qos.c