Subject: RE: [PATCH net-next v3 7/8] net: txgbe: support copper NIC with external PHY

From: Jiawen Wu <[email-masked]>
Date: Fri, 25 Aug 2023 15:46:56 +0800

On Thursday, August 24, 2023 9:02 PM, Andrew Lunn wrote:
> On Thu, Aug 24, 2023 at 10:00:41AM +0800, Jiawen Wu wrote:
> > On Wednesday, August 23, 2023 11:36 PM, Andrew Lunn wrote:
> > > > +static int txgbe_phy_read(struct mii_bus *bus, int phy_addr,
> > > > +			  int devnum, int regnum)
> > >
> > > There is a general pattern to use the postfix _c45 for the method that
> > > implements C45 access. Not a must, just a nice to have.
> > >
> > > Does this bus master not support C22 at all?
> >
> > It supports C22.
> 
> I was looking at how the two MDIO bus master implementations
> differ. Once difference is a register write to set C22/C45, which this
> code does not have. The second change appears to be a clock setting.
> 
> If you added C22, do the two become more similar? Should this actually
> be one implementation in the library?

Yes, it could be moved to libwx for txgbe/ngbe. I will send a patch later to implement it.