]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvneta: fix the remaining Rx descriptor unmapping issues
authorAntoine Tenart <antoine.tenart@bootlin.com>
Mon, 24 Sep 2018 14:56:13 +0000 (16:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Sep 2018 19:27:28 +0000 (12:27 -0700)
commit2b8e6b24f608d03c2c7e0e0a56b7bf7eeee9b6d8
tree3b7a277f96b3667fe6c2aa12ca352d4e446c24d3
parentb1399fa557f825a9b65ff96ea6ac300deafa3cb9
net: mvneta: fix the remaining Rx descriptor unmapping issues

With CONFIG_DMA_API_DEBUG enabled we get DMA unmapping warning in
various places of the mvneta driver, for example when putting down an
interface while traffic is passing through.

The issue is when using s/w buffer management, the Rx buffers are mapped
using dma_map_page but unmapped with dma_unmap_single. This patch fixes
this by using the right unmapping function.

Fixes: 0db0df595cbd ("net: mvneta: Improve the buffer allocation method for SWBM")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c