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)
commitfac24df7b9a6d9363abdff0e351ade041dd16daa
treeff1acbbdb6dd2cce0b09e147859c3394526d59fb
parent8ceca59fb3ed48a693171bd571c4fcbd555b7f1f
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: 46a3df9f9718 ("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