Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1445315pxb; Wed, 20 Oct 2021 05:23:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgTtJ+fPpJupFGYdnEFTE+sGWLWXQxiPt7NENaLqEioSddCtc72DOXVbDXDv66Yc+D/3+C X-Received: by 2002:a05:6402:40d3:: with SMTP id z19mr62979592edb.393.1634732602034; Wed, 20 Oct 2021 05:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634732602; cv=none; d=google.com; s=arc-20160816; b=FUleT3JBgerjDWegEAbRaphwTGGFcmIUcdQnjFPmLSHWdvIniMvruAgOfcIqlmI542 l2ZEyvW+kIx8X1NkCZYpRn5gr5Vs/Mg2Jl5ECwVHqPd5bNMjEw7b78/9jzSqH/rAuMQU 3OTwrOpkkmTaXH82PQeLftkJaTRei2/yLk4JyGu3Lr98mZgZsAiVW9zc0ziLMNL53spi sbJbcyJbjGEUxVEgMknzH5/2ZIlyWGyXmLc5LsPcJ+lKvQUDJU9hMh5xMoarg0Shj9Mw ep78ffglCKC+m6avjzfQqBPbIxO8umRTygge93CZ0i/RhIwDv8zqSAjFtt1n8/3TmIVW os+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YBO3q4jEfT92PWEmRoF47QEYl0r14ymXhDoJSvd0+ro=; b=ME3kcKrCwX87d7paA6CVfgGY2VpHwAsKpJxrhehJlVILiGurnu7nkrD7eRF3chi1+W lWSzGBnQ0Pg4cu06/GxFWQzEIHFvYJclyacT/KrNfNoXpwqDUlGQDZTSd3izMSHe8Ojj ZZQxEvvLA+M+aGO74wgjE9xvpH94pZd3TbwMoZLDjdb7b/BLK3GNL3HTbA43SjeAVBNg 1i0ZZBWU2iKaCxXSRd6PZ11QLZ5L8Kv8jzqKiuJI6skoBNlKadq6NJyQS+3luXdLh18h PzNQcWYigB7QNZGjQ6nAaCgT56GCMrfABbRDlfdhKkld3lvUrx6XTcFHqvqizXgNezQ2 cwFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vl8D85LS; 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 u13si2797110edp.551.2021.10.20.05.22.57; Wed, 20 Oct 2021 05:23:22 -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=@lunn.ch header.s=20171124 header.b=vl8D85LS; 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 S230232AbhJTMWo (ORCPT + 99 others); Wed, 20 Oct 2021 08:22:44 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:48580 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230174AbhJTMWl (ORCPT ); Wed, 20 Oct 2021 08:22:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=YBO3q4jEfT92PWEmRoF47QEYl0r14ymXhDoJSvd0+ro=; b=vl8D85LS4Vbhi4CRvAYx6q6W9J VgrDPYJEOMr30QH08xecELIRkjzsj4m55g842HPcrR7cHPN7AQJGoTh7BshwOgMrDU87qJC3EtRCL OoaoQV0DeP5rvIpIHpm4QA8dadMQGx6feiRHcEnyJNToFrmo0uyYkyBjNVYz3vlSJBVU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mdAZw-00BBO0-Ab; Wed, 20 Oct 2021 14:20:20 +0200 Date: Wed, 20 Oct 2021 14:20:20 +0200 From: Andrew Lunn To: Jie Luo Cc: Luo Jie , hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sricharan@codeaurora.org Subject: Re: [PATCH v3 07/13] net: phy: add qca8081 get_features Message-ID: References: <20211018033333.17677-1-luoj@codeaurora.org> <20211018033333.17677-8-luoj@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 20, 2021 at 02:39:57PM +0800, Jie Luo wrote: > > On 10/19/2021 5:44 AM, Andrew Lunn wrote: > > On Mon, Oct 18, 2021 at 11:33:27AM +0800, Luo Jie wrote: > > > 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 42d3f8ccca94..0c22ef735230 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); > > > + } > > genphy_c45_pma_read_abilities()? > > > > Andrew > > Hi Andrew, > > Thanks for this comment, if we use genphy_c45_pma_read_abilities here, the > ETHTOOL_LINK_MODE_Autoneg_BIT > > will be lost, since MDIO_MMD_AN.MDIO_STAT1 does not have bit > MDIO_AN_STAT1_ABLE. Yes, if your PHY breaks the standard, the helpers are not much use, that assume standard compliment PHYs. Andrew