net: hns3: fix for netdev not running problem after calling net_stop and net_open
authorFuyun Liang <liangfuyun1@huawei.com>
Sat, 10 Mar 2018 03:29:23 +0000 (11:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Mar 2018 02:53:31 +0000 (22:53 -0400)
commit8cc6c1f77ba024fac4fb0cecc359a7c6a0df443c
tree42fd0fda9ed7092037553fccd506d6d383807d52
parent590980558bd0f49ff598909464661298aad74819
net: hns3: fix for netdev not running problem after calling net_stop and net_open

The link status update function is called by timer every second. But
net_stop and net_open may be called with very short intervals. The link
status update function can not detect the link state has changed. It
causes the netdev not running problem.

This patch fixes it by updating the link state in ae_stop function.

Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c