From: Jian Shen Date: Thu, 4 Jul 2019 14:04:22 +0000 (+0800) Subject: net: hns3: fix port capbility updating issue X-Git-Tag: v5.2.3~187 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a5635e3d5a3a562e292835bde77be7678b8feb6f;p=users%2Fdwmw2%2Flinux.git net: hns3: fix port capbility updating issue [ Upstream commit 49b1255603de5183c5e377200be3b3afe0dcdb86 ] Currently, the driver queries the media port information, and updates the port capability periodically. But it sets an error mac->speed_type value, which stops update port capability. Fixes: 88d10bd6f730 ("net: hns3: add support for multiple media type") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index bab04d2d674aa..f2bffc05e9023 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -2592,6 +2592,7 @@ static int hclge_get_sfp_info(struct hclge_dev *hdev, struct hclge_mac *mac) mac->speed_ability = le32_to_cpu(resp->speed_ability); mac->autoneg = resp->autoneg; mac->support_autoneg = resp->autoneg_ability; + mac->speed_type = QUERY_ACTIVE_SPEED; if (!resp->active_fec) mac->fec_mode = 0; else