Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2224713ybi; Thu, 4 Jul 2019 07:09:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWMXuEIQwLwfx4mwjH8X9W9eJHQ70oepLSuyLN7h684WXQ6Q6no+UA9m3AoCZ743416RuF X-Received: by 2002:a17:902:b608:: with SMTP id b8mr7393557pls.303.1562249376083; Thu, 04 Jul 2019 07:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562249376; cv=none; d=google.com; s=arc-20160816; b=lpRPG8R6WyzBkmWkX/undYQ2A3I80UtxjRcAfg1vNhSxSF6kqcAg0BN8Qu0Isnm+8W vhTLOCP0FX/N2L5Eang7u9saeiLuMJVfnMJULT0MccMSps3n+AHLU8rzqPI+XKtg5rPB z8/mZHjR7giOB5FN7p0InuXQA4XlRb/29UDGW4qglyGOcdO7nmGGi/0NrzilnbE5M6nD FsY59/6KZEhy3f9cr83ENZ3kgV51hKl9tPdpHFSn7LhYZagUr+3MLLVvrxJrqzJMPcBx WZAexVE0aJTyM8hVRnfb5A/mDnPzgtOl/jv6YnV2yHEP0ZH4tj4wgkR4zOmqsv5gaAkt zFYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=3CvNmWj4aiDggn81ywXpCDjo/A3J9iIcFSl870KYPW8=; b=hjPsrlf+007cUGIJ1mY5ETHk4T5GVyc/JYN2p2103meknZx0CzchklNUezX/Zu15u2 xjvhE0qDvJZ/Z/o7K0r9o15IboMTdzW9ebb3kWPFzn/xVMuoxT6JS9FllYgKwUPIff2o kz3uh2Ti5nIxrUqmuexLMPH9G2Ul14bKLBlH3OOtoWpKp8Am+GUoEPbbeTVgmp9++ZGo NOOsit7VKi9x29N67k+VC9pTyOS631XozJIdrbTpBWz0ur2cwqSHJwXWXdJgaDuhTh4h rRnGyF6JZtWafXAn0pOM1aOma8d+S25BUWk+oacHolGlzEVT3LegjHwpSaH4hBvMGoXH U8iA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 24si5709101pgo.350.2019.07.04.07.09.20; Thu, 04 Jul 2019 07:09:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727740AbfGDOHH (ORCPT + 99 others); Thu, 4 Jul 2019 10:07:07 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8700 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727365AbfGDOGa (ORCPT ); Thu, 4 Jul 2019 10:06:30 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id EEB5710051764C2361E9; Thu, 4 Jul 2019 22:06:26 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Thu, 4 Jul 2019 22:06:16 +0800 From: Huazhong Tan To: CC: , , , , , Jian Shen , Peng Li , "Huazhong Tan" Subject: [PATCH net-next 3/9] net: hns3: fix port capbility updating issue Date: Thu, 4 Jul 2019 22:04:22 +0800 Message-ID: <1562249068-40176-4-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1562249068-40176-1-git-send-email-tanhuazhong@huawei.com> References: <1562249068-40176-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian Shen 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 --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 2ecc10a..94c94e1 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 -- 2.7.4