]> git.baikalelectronics.ru Git - kernel.git/commit
amd-xgbe: Fix DMA API debug warning
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Mon, 6 Jul 2015 16:57:37 +0000 (11:57 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jul 2015 22:57:14 +0000 (15:57 -0700)
commit68b39fa0886eefbdd0bccf9236aa130b52384599
tree6b129aeb7b38ea566f1548463ec32a7a9550dcf5
parent96fd8e8ed4e69abbee1a38be8ecfb1f954f0db03
amd-xgbe: Fix DMA API debug warning

When running a kernel configured with CONFIG_DMA_API_DEBUG=y a warning
is issued:
  DMA-API: device driver tries to sync DMA memory it has not allocated

This warning is the result of mapping the full range of the Rx buffer
pages allocated and then performing a dma_sync_single_for_cpu against
a calculated DMA address. The proper thing to do is to use the
dma_sync_single_range_for_cpu with a base DMA address and an offset.

Reported-by: Kim Phillips <kim.phillips@arm.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Tested-by: Kim Phillips <kim.phillips@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-desc.c
drivers/net/ethernet/amd/xgbe/xgbe-dev.c
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
drivers/net/ethernet/amd/xgbe/xgbe.h