diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2019-05-28 17:03:00 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-28 17:39:01 -0700 |
commit | acfc3d55b7326ff280f1aa64b6d93755619071b3 (patch) | |
tree | 1fa22777f25380e7ee2deb016f9b3bd83fa238fe /drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | |
parent | net: hns3: add handshake with hardware while doing reset (diff) | |
download | linux-dev-acfc3d55b7326ff280f1aa64b6d93755619071b3.tar.xz linux-dev-acfc3d55b7326ff280f1aa64b6d93755619071b3.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h index eab1095bf221..a7fbd38c1492 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h @@ -130,6 +130,7 @@ enum hclgevf_states { HCLGEVF_STATE_DOWN, HCLGEVF_STATE_DISABLED, HCLGEVF_STATE_IRQ_INITED, + HCLGEVF_STATE_REMOVING, HCLGEVF_STATE_NIC_REGISTERED, /* task states */ HCLGEVF_STATE_SERVICE_SCHED, |