Received: by 10.223.164.221 with SMTP id h29csp2897669wrb; Thu, 2 Nov 2017 20:52:46 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Tq0rEMZ0ipavtBPBhMdt0LbJcCaWTkh5KOEgW2V4GC5z3Wq6fd1f/BDpnHGzaAn+asIceN X-Received: by 10.101.65.200 with SMTP id b8mr5826792pgq.274.1509681166752; Thu, 02 Nov 2017 20:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509681166; cv=none; d=google.com; s=arc-20160816; b=G62oxrWwUK1F0sLk4d1166TAnWPv5x6c9CNfIvV31wC+N+HvpGo4Q4n2oiQlXtq8Ly dnKL+SzQAcEWjHou3ntHAWzkw30iWt32qMwm6p2KHX3bxyhqQtyGZgtv+gmMp/OJ2GN1 /OfmjKu/Zt3MkGyXb/g7r6JXaz4eHKLYSX00q3Vy8hfvYkKLNkCmV/ywAmHWtjtFkzgB j2PUCYNyCpEMT+p+4L4Jf8A9D4JefEqxclv6rwHGsPehvHYyCMfYm6+fQ/mVhUzox1ZB n32C/A/XwwoszAO1SkwZe8bZ1AcRPD3WhDUNmupc4ztHoc3bR17TndKtqq/RHd2q12P/ m+OQ== 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:arc-authentication-results; bh=nRdxk2jr5ZuSxX6ScVg/5jYgcijXez0jruSbSQrLvDE=; b=MAqHb8VkD4jhmddl27/JCbblV5WKPveHW5fJuwlUNZW65B6+e5rNdSmcHu/FKkP7yk Ty82YA5rfKhxd19Ejyoy2W7fZy1KHVf8S+3fvfq1vjEjic2bOlZhlEvJ5KsHENW1r3B7 AGY/usiCq0lcXSitVuXMoEOkjhOpExRW0hFVV/MrmvyHkmLsj22ibYyaQwc4HO8uVjXP RCTqpNtidQjJlW6aq9V4TMazc+aGYRw8meAZHeSEbeJBkXnM7x15eYqQ62wVMhTMCj/0 eSYGHuOqhN1EdeN+SLntDSIXO9t6/w/ZXuerxj1KGQMvhKLvULnMAWLQZI2qbmsrDu3P 5B+Q== 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 1si3724663plz.113.2017.11.02.20.52.33; Thu, 02 Nov 2017 20:52:46 -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 S933163AbdKCDvQ (ORCPT + 97 others); Thu, 2 Nov 2017 23:51:16 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9944 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752435AbdKCDvI (ORCPT ); Thu, 2 Nov 2017 23:51:08 -0400 Received: from 172.30.72.58 (EHLO DGGEMS411-HUB.china.huawei.com) ([172.30.72.58]) by dggrg04-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DKE90169; Fri, 03 Nov 2017 11:51:04 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.361.1; Fri, 3 Nov 2017 11:50:56 +0800 From: Lipeng To: CC: , , , , Subject: [PATCH net-next 6/6] net: hns3: fix a bug for phy supported feature initialization Date: Fri, 3 Nov 2017 12:18:30 +0800 Message-ID: <1509682710-94908-7-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509682710-94908-1-git-send-email-lipeng321@huawei.com> References: <1509682710-94908-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.59FBE7A8.00D1,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 1fd1ead9a232426365ac39824b072101 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fuyun Liang This patch fixes a bug for phy supported feature initialization. Currently, the value of phydev->supported is initialized by kernel. So it includes many features that we do not support, such as SUPPORTED_FIBRE and SUPPORTED_BNC. This patch fixes it. Fixes: 256727d (net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c index f32d719..7069e94 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c @@ -14,6 +14,13 @@ #include "hclge_main.h" #include "hclge_mdio.h" +#define HCLGE_PHY_SUPPORTED_FEATURES (SUPPORTED_Autoneg | \ + SUPPORTED_TP | \ + SUPPORTED_Pause | \ + PHY_10BT_FEATURES | \ + PHY_100BT_FEATURES | \ + PHY_1000BT_FEATURES) + enum hclge_mdio_c22_op_seq { HCLGE_MDIO_C22_WRITE = 1, HCLGE_MDIO_C22_READ = 2 @@ -195,6 +202,9 @@ int hclge_mac_start_phy(struct hclge_dev *hdev) return ret; } + phydev->supported &= HCLGE_PHY_SUPPORTED_FEATURES; + phydev->advertising = phydev->supported; + phy_start(phydev); return 0; -- 1.9.1 From 1589603584332430726@xxx Sun Jan 14 21:08:31 +0000 2018 X-GM-THRID: 1582989732171095478 X-Gmail-Labels: Inbox,Category Forums,Downloaded_2018-01