]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix return value error when query MAC link status fail
authorJian Shen <shenjian15@huawei.com>
Tue, 21 Jul 2020 11:03:54 +0000 (19:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 22:49:17 +0000 (15:49 -0700)
commit603235893de762cd2e732f8e3d48f0359ce14b2c
treeff1acbbdb6dd2cce0b09e147859c3394526d59fb
parentb4c97766c058f379f59f640a951348e48b531b64
net: hns3: fix return value error when query MAC link status fail

Currently, PF queries the MAC link status per second by calling
function hclge_get_mac_link_status(). It return the error code
when failed to send cmdq command to firmware. It's incorrect,
because this return value is used as the MAC link status, which
0 means link down, and none-zero means link up. So fixes it.

Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong tan <tanhuazhong@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/hns3pf/hclge_main.h