]> 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)
commit98a48e64bcdd2745f62b555b992111bae90ed34c
tree3dce1059c93ee3fca6dc644b8c5eaf46d814e16d
parent0950eb4ddc8db52ecc9aa3bc8ac141396b38a6ee
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: dc37d05f9885 ("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