diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2018-11-07 12:06:07 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-07 11:42:17 -0800 |
commit | 814da63c557726e60b06a206ec8c1123f176d392 (patch) | |
tree | 4f71a794681cdc1fd664309ba18d348754d3bbf0 /drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | |
parent | Merge branch 'net-systemport-Unmap-queues-upon-DSA-unregister-event' (diff) | |
download | linux-dev-814da63c557726e60b06a206ec8c1123f176d392.tar.xz linux-dev-814da63c557726e60b06a206ec8c1123f176d392.zip |
net: hns3: use HNS3_NIC_STATE_INITED to indicate the initialization state of enet
Besides of module_init and module_exit, the process of reset will
also uninitialize and initialize the enet client. When reset process
fails with enet client uninitialized, the module_exit does not need
to uninitialize the enet client, otherwise it may cause double
uninitialization problem.
So we need the HNS3_NIC_STATE_INITED flag to indicate whether
the enet client is initialized.
Also HNS3_NIC_STATE_REINITING is previously unused, so change it to
HNS3_NIC_STATE_INITED.
Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_enet.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h index d3636d088aa3..7b759e424d54 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h @@ -15,7 +15,7 @@ extern const char hns3_driver_version[]; enum hns3_nic_state { HNS3_NIC_STATE_TESTING, HNS3_NIC_STATE_RESETTING, - HNS3_NIC_STATE_REINITING, + HNS3_NIC_STATE_INITED, HNS3_NIC_STATE_DOWN, HNS3_NIC_STATE_DISABLED, HNS3_NIC_STATE_REMOVING, |