]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: hns3: stop schedule reset service while unloading driver
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 28 May 2019 09:03:00 +0000 (17:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 May 2019 00:39:01 +0000 (17:39 -0700)
commitacfc3d55b7326ff280f1aa64b6d93755619071b3
tree1fa22777f25380e7ee2deb016f9b3bd83fa238fe
parentada13ee3db7b8959d7df81265a2633f987a0a13c
net: hns3: stop schedule reset service while unloading driver

When unloading driver, the reset task should not be scheduled
anymore. If disable IRQ before cancel ongoing reset task,
the IRQ may be re-enabled by the reset task.

This patch uses HCLGE_STATE_REMOVING/HCLGEVF_STATE_REMOVING
flag to indicate that the driver is unloading, and we should
stop new coming reset service to be scheduled, otherwise,
reset service will access some resource which has been freed
by unloading.

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/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h