Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp348162pxb; Fri, 15 Oct 2021 06:46:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0QeRVd4ed6/9ZBmZs8SFK/ArxNwHcVDagn9GQik3OIW/C8twe41l/TUxH5gII/iCvv9Dt X-Received: by 2002:a17:906:ce2c:: with SMTP id sd12mr7040230ejb.488.1634305566129; Fri, 15 Oct 2021 06:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634305566; cv=none; d=google.com; s=arc-20160816; b=VFJr77npm5lLfTSzrb55PYkdjKmhRFT0GplDpMZ9gS87uECLzmqZq8oFTXvmPBEHGv U30R9BkySADrD0vE8uJgY49D0NNA8ManMBK8Z837B/8V7JLwmrJAZ+cqJ/sYLduY0reK n7TnSWpAR13XGORrlmlAflSflJBDuesiEHnoPxqIrIuw03EYylGHYwzD9Z9tuuId9PpW KBWbZ0benTZ+L3023bSFaQ1C2pl1nMOzAk7+s1KSMAqVhmFMc4b+IUQd5elx6wnbS8RK A26jgJBXy6yPqXeAZpXpCCSGrwv4AMg1R+nC3TOhvbyObuIoFGMX4F4F+lII4Stfu2Ej FcBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=Xd915T2pwFv4FS5kVMMCJP3OUkitOAZTX7gBBBDlx7k=; b=k1ZkduhGsbsmeK6YTv5UKY+hC3t6WlNAo7FtVXhp+fNNPee1B+ELMp+b6C4S4wCjLu V1/K8ui+xyZShDceuohhX5Ur6kEB9SryF1UU+OK/fQe9AUnf0uaaLpHQSPEBiHMDa8iY vhMBs3pdl2VGPRLKraFriOXeDqMsnAX/rXVRgk5S5BU6X1KHwr/XOMl9/Ng3YOwt8GZ0 a0pwNRawB+TwNsds15iJC4In6EBzBgWbU7XQGUDiGNSCMHd/Uey00FKorknnsf1CS1T4 wvOJaF6CgU5FagthmVCeoE1nw9Q48TYbi9yHUQyJ2nu/X6oARB0uWvUb97TRrbsdBPAY c2tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b="oYwV2m/z"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm20si7385744ejc.206.2021.10.15.06.45.41; Fri, 15 Oct 2021 06:46:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b="oYwV2m/z"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236243AbhJOHiw (ORCPT + 99 others); Fri, 15 Oct 2021 03:38:52 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:36199 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236126AbhJOHiF (ORCPT ); Fri, 15 Oct 2021 03:38:05 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1634283359; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=Xd915T2pwFv4FS5kVMMCJP3OUkitOAZTX7gBBBDlx7k=; b=oYwV2m/z4FvbSgG3GRlMjys9gA0e/ZwI1ydQiYAIDIusB+INaG3DZxEWpMvjtStukM3JfBvK 5L+PND0jLmSVbBuCTiyeTTGrArSF8iTZWMZ92yCEFJ+mC9pYwwLWyZssGtdnxKhNoDuBx63x LObQZMYpElV2B5aZsRDHPi0TFEE= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 61692f4a4ccc4cf2c7ab072f (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 15 Oct 2021 07:35:38 GMT Sender: luoj=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 1B67EC4361B; Fri, 15 Oct 2021 07:35:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from akronite-sh-dev02.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: luoj) by smtp.codeaurora.org (Postfix) with ESMTPSA id 91E90C4338F; Fri, 15 Oct 2021 07:35:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 91E90C4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org From: Luo Jie To: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sricharan@codeaurora.org, Luo Jie Subject: [PATCH v2 07/13] net: phy: add qca8081 get_features Date: Fri, 15 Oct 2021 15:34:59 +0800 Message-Id: <20211015073505.1893-8-luoj@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211015073505.1893-1-luoj@codeaurora.org> References: <20211015073505.1893-1-luoj@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reuse the at803x phy driver get_features excepting adding 2500M capability. Signed-off-by: Luo Jie --- drivers/net/phy/at803x.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index c875dace5a00..7aec37593983 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -719,6 +719,15 @@ static int at803x_get_features(struct phy_device *phydev) if (err) return err; + if (phydev->drv->phy_id == QCA8081_PHY_ID) { + err = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_NG_EXTABLE); + if (err < 0) + return err; + + linkmode_mod_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->supported, + err & MDIO_PMA_NG_EXTABLE_2_5GBT); + } + if (phydev->drv->phy_id != ATH8031_PHY_ID) return 0; @@ -1493,6 +1502,7 @@ static struct phy_driver at803x_driver[] = { .set_tunable = at803x_set_tunable, .set_wol = at803x_set_wol, .get_wol = at803x_get_wol, + .get_features = at803x_get_features, .suspend = genphy_suspend, .resume = genphy_resume, .read_status = qca808x_read_status, -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project