]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9632689125c3e1994d75cbcc7e3aca510dbcf2f3
tree42fd0fda9ed7092037553fccd506d6d383807d52
parent934375a342ed2178d391f026c5b174a6f36918be
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