net: hisilicon: Fix dma_map_single failed on arm64
authorJiangfeng Xiao <xiaojiangfeng@huawei.com>
Sat, 3 Aug 2019 12:31:41 +0000 (20:31 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Aug 2019 21:14:01 +0000 (14:14 -0700)
commit96a50c0d907ac8f5c3d6b051031a19eb8a2b53e3
tree21714b958e1c9786895f5dc70821c45997efb467
parentf2243b82785942be519016067ee6c55a063bbfe2
net: hisilicon: Fix dma_map_single failed on arm64

On the arm64 platform, executing "ifconfig eth0 up" will fail,
returning "ifconfig: SIOCSIFFLAGS: Input/output error."

ndev->dev is not initialized, dma_map_single->get_dma_ops->
dummy_dma_ops->__dummy_map_page will return DMA_ERROR_CODE
directly, so when we use dma_map_single, the first parameter
is to use the device of platform_device.

Signed-off-by: Jiangfeng Xiao <xiaojiangfeng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hip04_eth.c