]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvneta: fix the Rx desc DMA address in the Rx path
authorAntoine Tenart <antoine.tenart@bootlin.com>
Fri, 22 Jun 2018 08:15:39 +0000 (10:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 Jun 2018 01:40:15 +0000 (10:40 +0900)
commit433ec96d361e6f9d90e7c5c053d52551eff9c40c
treeb47073e4ee3a9342de9357252d169cfea7b8cd96
parent73f6a384415da8c06efcff9a739cfafb1a5aa27a
net: mvneta: fix the Rx desc DMA address in the Rx path

When using s/w buffer management, buffers are allocated and DMA mapped.
When doing so on an arm64 platform, an offset correction is applied on
the DMA address, before storing it in an Rx descriptor. The issue is
this DMA address is then used later in the Rx path without removing the
offset correction. Thus the DMA address is wrong, which can led to
various issues.

This patch fixes this by removing the offset correction from the DMA
address retrieved from the Rx descriptor before using it in the Rx path.

Fixes: e7b0263e5706 ("net: mvneta: Convert to be 64 bits compatible")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c