net: mvneta: fix DMA buffer unmapping in mvneta_rx()
authorSimon Guinot <simon.guinot@sequanux.org>
Tue, 15 Sep 2015 20:41:21 +0000 (22:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Oct 2015 11:51:37 +0000 (13:51 +0200)
commitabb7a0340081651d037faa2149163f475f2c44ea
tree6152f5f776259b7530b9c2a2a0e1adac546c8bfe
parentc5de8f88c0177f3ac724cd4ad4caa685fee11945
net: mvneta: fix DMA buffer unmapping in mvneta_rx()

[ Upstream commit daf158d0d544cec80b7b30deff8cfc59a6e17610 ]

This patch fixes a regression introduced by the commit a84e32894191
("net: mvneta: fix refilling for Rx DMA buffers"). Due to this commit
the newly allocated Rx buffers are DMA-unmapped in place of those passed
to the networking stack. Obviously, this causes data corruptions.

This patch fixes the issue by ensuring that the right Rx buffers are
DMA-unmapped.

Reported-by: Oren Laskin <oren@igneous.io>
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Fixes: a84e32894191 ("net: mvneta: fix refilling for Rx DMA buffers")
Cc: <stable@vger.kernel.org> # v3.8+
Tested-by: Oren Laskin <oren@igneous.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mvneta.c