提交 7af74912 编写于 作者: S shenjian 提交者: Xie XiuQi

net: hns3: fix return value error when query mac link status fail

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

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.
This patch fixes it by changing the return value to 0.

Feature or Bugfix:Bugfix
Signed-off-by: Nshenjian (K) <shenjian15@huawei.com>
Reviewed-by: Nlipeng <lipeng321@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 d57eff1f
...@@ -2615,7 +2615,7 @@ static int hclge_get_mac_link_status(struct hclge_dev *hdev) ...@@ -2615,7 +2615,7 @@ static int hclge_get_mac_link_status(struct hclge_dev *hdev)
if (ret) { if (ret) {
dev_err(&hdev->pdev->dev, "get link status cmd failed %d\n", dev_err(&hdev->pdev->dev, "get link status cmd failed %d\n",
ret); ret);
return ret; return 0;
} }
req = (struct hclge_link_status_cmd *)desc.data; req = (struct hclge_link_status_cmd *)desc.data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册