]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 17 Sep 2019 16:02:18 +0000 (18:02 +0200)
commit3586af54f5f808d430f0068b8772c2cf42b6eb86
tree4c026cbb7085699befba4493c7e614c11eb503e4
parentaa71aea6f3f476d0afbc857fcdbda7aef19ebf43
net: hisilicon: Fix dma_map_single failed on arm64

BugLink: https://bugs.launchpad.net/bugs/1842114
[ Upstream commit 96a50c0d907ac8f5c3d6b051031a19eb8a2b53e3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/hisilicon/hip04_eth.c