diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2019-06-20 16:52:43 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-26 11:59:02 -0400 |
commit | 7cf9c069430fce7142da7039cc453902df11259b (patch) | |
tree | ab1d1375355997dac7794ae5cdaaad265de13671 /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | |
parent | net: hns3: add check to number of buffer descriptors (diff) | |
download | linux-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.h | 1 |
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 { |