]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix netif_napi_del() not do problem when unloading
authorHuazhong Tan <tanhuazhong@huawei.com>
Wed, 30 Jan 2019 20:55:47 +0000 (04:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Jan 2019 22:50:03 +0000 (14:50 -0800)
commitca730f81a836406fda8df8b988e848f5c9c6af37
tree2c1f26c0400569d3b3d7db6f88864b639667b172
parent7aa860dae086595c06052168394e7bdd656b4576
net: hns3: fix netif_napi_del() not do problem when unloading

When the driver is unloading, if a global reset occurs,
unmap_ring_from_vector() in the hns3_nic_uninit_vector_data() will
fail, and hns3_nic_uninit_vector_data() just return. There may be
some netif_napi_del() not be done.

Since hardware will unmap all ring while resetting, so
hns3_nic_uninit_vector_data() should ignore this error, and do the
rest uninitialization.

Fixes: 6e2406330b28 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c