On Fri, Nov 30, 2018 at 11:53 PM Anssi Hannula <anssi.hann...@bitwise.fi> wrote:
>
> 64-bit DMA addresses are split in upper and lower halves that are
> written in separate fields on GEM. For RX, bit 0 of the address is used
> as the ownership bit (RX_USED). When the RX_USED bit is unset the
> controller is allowed to write data to the buffer.
>
> The driver does not guarantee that the controller already sees the upper
> half when the RX_USED bit is cleared, possibly resulting in the
> controller writing an incoming frame to an address with an incorrect
> upper half and therefore possibly corrupting unrelated system memory.
>
> Fix that by adding the necessary DMA memory barrier between the writes.
>
> This corruption was observed on a ZynqMP based system.
>
> Signed-off-by: Anssi Hannula <anssi.hann...@bitwise.fi>
> Fixes: fff8019a08b6 ("net: macb: Add 64 bit addressing support for GEM")
> Cc: Nicolas Ferre <nicolas.fe...@microchip.com>
> Cc: Harini Katakam <harini.kata...@xilinx.com>
> Cc: Michal Simek <michal.si...@xilinx.com>

Acked-by: Harini Katakam <harini.kata...@xilinx.com>

Regards,
Harini

Reply via email to