]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns: fix for unmapping problem when SMMU is on
authorYunsheng Lin <linyunsheng@huawei.com>
Tue, 25 Sep 2018 09:21:55 +0000 (10:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Sep 2018 17:42:20 +0000 (10:42 -0700)
commite55057d8f5a84151e4a2d09f566e1ae3f9b7091a
treee7685fa03f226067c362105afdb5cf3f468121ff
parentcd12d2a0b94aa759fd12d579f9e6d735fa4e2361
net: hns: fix for unmapping problem when SMMU is on

If SMMU is on, there is more likely that skb_shinfo(skb)->frags[i]
can not send by a single BD. when this happen, the
hns_nic_net_xmit_hw function map the whole data in a frags using
skb_frag_dma_map, but unmap each BD' data individually when tx is
done, which causes problem when SMMU is on.

This patch fixes this problem by ummapping the whole data in a
frags when tx is done.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@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>
drivers/net/ethernet/hisilicon/hns/hnae.c
drivers/net/ethernet/hisilicon/hns/hns_enet.c