diff options
author | Jian Shen <shenjian15@huawei.com> | 2019-07-04 22:04:22 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-05 15:39:38 -0700 |
commit | 49b1255603de5183c5e377200be3b3afe0dcdb86 (patch) | |
tree | 3610ec88058142b5e88aa0bf0438e81ab86a4950 | |
parent | fb89629f2ecfa0feb07f9981c1bd66a4b4407f44 (diff) | |
download | linux-49b1255603de5183c5e377200be3b3afe0dcdb86.tar.bz2 |
net: hns3: fix port capbility updating issue
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 <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 2ecc10a3c446..94c94e14fb25 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -2663,6 +2663,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 |