net: hns: Fix the device being used for dma mapping during TX
authorKejian Yan <yankejian@huawei.com>
Wed, 24 May 2017 01:53:41 +0000 (21:53 -0400)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:57:31 +0000 (02:57 +0000)
commit441f3ec43fe57baae8bc940fc92b40ab426c732d
treef4eee1e14923510e1e48483bb0894c8f15b90a2a
parent8e4d411542e03589d85d2847cfa980324cc2391f
net: hns: Fix the device being used for dma mapping during TX

[ Upstream commit b85ea006b6bebb692628f11882af41c3e12e1e09 ]

This patch fixes the device being used to DMA map skb->data.
Erroneous device assignment causes the crash when SMMU is enabled.
This happens during TX since buffer gets DMA mapped with device
correspondign to net_device and gets unmapped using the device
related to DSAF.

Signed-off-by: Kejian Yan <yankejian@huawei.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns/hns_enet.c