]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: fix buffers' DMA handling on RX path
authorMarcin Wojtas <mw@semihalf.com>
Thu, 3 Dec 2015 14:20:50 +0000 (15:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Dec 2015 20:01:13 +0000 (15:01 -0500)
commit28a22dd1c0b3f2d450a4016fa079621cbe3a1016
tree3dce1059c93ee3fca6dc644b8c5eaf46d814e16d
parentae2c5b5be0bb3d1fc0431781af4bbf667ff5c6cf
net: mvpp2: fix buffers' DMA handling on RX path

Each allocated buffer, whose pointer is put into BM pool is DMA-mapped.
Hence it should be properly unmapped after usage or when removing buffers
from pool.

This commit fixes DMA handling on RX path by adding dma_unmap_single() in
mvpp2_rx() and in mvpp2_bufs_free(). The latter function's argument number
had to be increased for this purpose.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Fixes: decc8a74c68c ("ethernet: Add new driver for Marvell Armada 375
network unit")

Cc: <stable@vger.kernel.org> # v3.18+
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c