]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: bcmgenet: Utilize correct struct device for all DMA operations
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 1 Dec 2016 17:45:45 +0000 (09:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Dec 2016 18:09:41 +0000 (19:09 +0100)
commitbbf913d774b71a3198dd2d2c83b4955b55ed72ba
treeb077739a600bb4c1d0f3e913255f83d3696ecfa8
parentaccb7c99fc0f496ec17ce00d291db8ce1d2e9a13
net: bcmgenet: Utilize correct struct device for all DMA operations

[ Upstream commit 8c4799ac799665065f9bf1364fd71bf4f7dc6a4a ]

__bcmgenet_tx_reclaim() and bcmgenet_free_rx_buffers() are not using the
same struct device during unmap that was used for the map operation,
which makes DMA-API debugging warn about it. Fix this by always using
&priv->pdev->dev throughout the driver, using an identical device
reference for all map/unmap calls.

Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/genet/bcmgenet.c