]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Check hdev state when getting link status
authorPeng Li <lipeng321@huawei.com>
Wed, 19 Sep 2018 17:29:53 +0000 (18:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Sep 2018 04:20:22 +0000 (21:20 -0700)
commit0a4c3aaa194dd2a1e1f089a74053a4d10e04950c
tree8682a25b8ceb4ab0c61addf8b3c13aee61b7aeb7
parent678060cbbb52c75323ef6205de131a18f5cc775b
net: hns3: Check hdev state when getting link status

By default, HW link status is up. If hclge_update_link_status is called
before net up, driver will print "link up". It is not suitable. hdev
state check is needed when getting link status.

Fixes: 575d84053c84 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Fixes: 8d24118d4958 ("net: hns3: Add HNS3 VF HCL(Hardware 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
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c