From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH] net: phy: use generic clause 45 autonegotiation done Date: Thu, 19 Jul 2018 16:49:16 +0200 Message-ID: <20180719144916.GB9119@lunn.ch> References: <1531919535-20269-1-git-send-email-camelia.groza@nxp.com> <20180718143919.GA10856@lunn.ch> <20180719125635.GK17271@n2100.armlinux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Camelia Alexandra Groza , "f.fainelli@gmail.com" , "davem@davemloft.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" To: Russell King - ARM Linux Return-path: Content-Disposition: inline In-Reply-To: <20180719125635.GK17271@n2100.armlinux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Thu, Jul 19, 2018 at 01:56:35PM +0100, Russell King - ARM Linux wrote: > On Thu, Jul 19, 2018 at 12:47:18PM +0000, Camelia Alexandra Groza wrote: > > > -----Original Message----- > > > From: Andrew Lunn [mailto:andrew@lunn.ch] > > > Sent: Wednesday, July 18, 2018 17:39 > > > To: Camelia Alexandra Groza > > > Cc: f.fainelli@gmail.com; davem@davemloft.net; netdev@vger.kernel.org; > > > linux-kernel@vger.kernel.org > > > Subject: Re: [PATCH] net: phy: use generic clause 45 autonegotiation done > > > > > > On Wed, Jul 18, 2018 at 04:12:15PM +0300, Camelia Groza wrote: > > > > Only Clause 22 PHYs can use genphy_aneg_done(). Use > > > > genphy_c45_aneg_done() for PHYs that implement Clause 45 without the > > > > Clause 22 register set. > > > > > > > > This change follows the model of phy_restart_aneg() which > > > > differentiates between the two implementations in a similar way. > > > > > > Hi Camelia > > > > > > What about phy_config_aneg()? I would assume any sort of auto-neg action > > > needs to check for c45 without c22, before calling a genphy_ function. Do you > > > think it is possible to write a genphy_c45_config_aneg()? If not, we might > > > want to return -EOPNOTSUPP. > > > > Hi Andrew, > > > > Adding Russell to the thread as well, since he wrote the c45 helpers. > > > > Sure, I'll send a v2 with an additional generic phy_config_aneg(). I'll > > stick to returning -EOPNOTSUPP for c22-less PHYs for now. > > Be aware that there are no generic registers for configuring (eg) 1G > speeds in C45 phys - that is vendor specific. So returning -EOPNOTSUPP sounds like the right thing to do, making it clear the PHY driver needs to implement it. Thanks Andrew