]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
net: hns3: use HNS3_NIC_STATE_INITED to indicate the initialization state of enet
authorHuazhong Tan <tanhuazhong@huawei.com>
Wed, 7 Nov 2018 04:06:07 +0000 (12:06 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commit352285f19dd7ce9c3120f1deb27871bb46e51f1b
tree436f44813a03e698122d40f7726997f7dfa9a6f9
parent118d916686a72568095346f950b4bb89345948f4
net: hns3: use HNS3_NIC_STATE_INITED to indicate the initialization state of enet

BugLink: https://bugs.launchpad.net/bugs/1810457
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>
(cherry picked from commit 814da63c557726e60b06a206ec8c1123f176d392)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h