net: hns3: delay ring buffer clearing during reset
authorYunsheng Lin <linyunsheng@huawei.com>
Thu, 13 Jun 2019 09:12:31 +0000 (17:12 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Jun 2019 02:26:16 +0000 (19:26 -0700)
commit3a30964a2eef6aabd3ab18b979ea0eacf1147731
tree45380eeb1562f54c1884feceab2f079a2d3b8a18
parent8f9eed1a8791b83eb1c54c261d68424717e4111e
net: hns3: delay ring buffer clearing during reset

The driver may not be able to disable the ring through firmware
when downing the netdev during reset process, which may cause
hardware accessing freed buffer problem.

This patch delays the ring buffer clearing to reset uninit
process because hardware will not access the ring buffer after
hardware reset is completed.

Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c