Skip to content

Commit

Permalink
net: hns3: Fix for netdev not running problem after calling net_stop …
Browse files Browse the repository at this point in the history
…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: 46a3df9 ("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>
  • Loading branch information
Fuyun Liang authored and David S. Miller committed May 20, 2018
1 parent 4268754 commit f30dfdd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3793,6 +3793,9 @@ static void hclge_ae_stop(struct hnae3_handle *handle)

/* reset tqp stats */
hclge_reset_tqp_stats(handle);
del_timer_sync(&hdev->service_timer);
cancel_work_sync(&hdev->service_task);
hclge_update_link_status(hdev);
}

static int hclge_get_mac_vlan_cmd_status(struct hclge_vport *vport,
Expand Down

0 comments on commit f30dfdd

Please sign in to comment.