aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
diff options
context:
space:
mode:
authorHuazhong Tan <tanhuazhong@huawei.com>2019-06-20 16:52:43 +0800
committerDavid S. Miller <davem@davemloft.net>2019-06-26 11:59:02 -0400
commit7cf9c069430fce7142da7039cc453902df11259b (patch)
treeab1d1375355997dac7794ae5cdaaad265de13671 /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
parentnet: hns3: add check to number of buffer descriptors (diff)
downloadlinux-dev-7cf9c069430fce7142da7039cc453902df11259b.tar.xz
linux-dev-7cf9c069430fce7142da7039cc453902df11259b.zip
net: hns3: fix race conditions between reset and module loading & unloading
When loading or unloading module, it should wait for the reset task done before it un-initializes the client, otherwise the reset task may cause a NULL pointer reference. 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 'drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
index 8c4e47a4c266..6a12285f4c76 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
@@ -700,6 +700,7 @@ struct hclge_mac_tnl_stats {
};
#define HCLGE_RESET_INTERVAL (10 * HZ)
+#define HCLGE_WAIT_RESET_DONE 100
#pragma pack(1)
struct hclge_vf_vlan_cfg {