]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: hns3: refine the handle for hns3_nic_net_open/stop()
authorJian Shen <shenjian15@huawei.com>
Thu, 20 Dec 2018 03:51:58 +0000 (11:51 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commitfad0e9d83d97c7a252178fcfe6c00e06ed48714a
tree4358054dbbff9d6779d4bb2cad3f2fb17981f7de
parent3e5d03c765cccd29f35eeddde3c1cd62ad5a366c
net: hns3: refine the handle for hns3_nic_net_open/stop()

BugLink: https://bugs.launchpad.net/bugs/1810457
When triggering nic down, there is a time window between bringing down
the protocol stack and stopping the work task. If the net is up in the
time window, it may bring up the protocol stack again.

This patch fixes it by stop the work task at the beginning of
hns3_nic_net_stop(). To keep symmetrical, start the work task at the
end of hns3_nic_net_open().

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 8cdb992f0dc36d6382840b1a6320e0c327a7d644)
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/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c