]> 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, 19 May 2018 15:53:21 +0000 (16:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 20 May 2018 22:53:59 +0000 (18:53 -0400)
commit0da1961711d83e28259af92a82eb605dd070fd94
treed4e64f8529f91037f6d2cd17d620e3d5b7578324
parentc65f0b142f544d9364f61fbfa23ee93bc13dab57
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.

Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c