Re: [PATCH net-next 4/5] onsemi: ncn260xx: Add driver support for NCN26010 and TS2500 MAC-PHY
From: Andrew Lunn
Date: Mon May 04 2026 - 15:15:48 EST
> > So you seem to be compliant with the standard. I've not seen anything
> > use MDIO_MMD_POWER_UNIT so not having that should not be an
> > issue. MDIO_MMD_AN is used by a number of PHYs, but i assume yours
> > does not.
> >
> > 802.3 C45 says that if a register does not exist, it should read
> > 0. What would happen if a read was made to
> > OA_TC6_PHY_C45_AUTO_NEG_MMS5, rather than returning EOPNOTSUPP?
> >
> > Table 6 says nothing about MMD 30, which you map to 12. 10-15 are
> > defined as vendor specific, so that is O.K.
> >
> > But can we simply this. Add something like
> >
> > void oa_tc6_set_vend1_mms(struct oa_tc6 *tc6, int mms)
> > {
> > tc6->vend1_mms = mms;
> > }
> >
> > and make oa_tc6_get_phy_c45_mms() look at its value?
>
> Sure. I can do that.
>
> Since we don't support PCS, and POWER_UNIT, may I suggest alternative solution?
I would prefer to rely on 802.3 defined C45 behaviour. A read to a
register which does not exists gives 0. That is what PHYs and phylib
expect.
You failed to answer my question about this. What happens with your
device if you access C45 registers which don't exist?
> This gives flexibility to vendors as mostly likely, all the vendors
> may not share the same set of MDIO_MMD_XXX support.
Well, all vendors should support what is defined in the standard. It
is only MDIO_MMD_VEND1 which is left undefined, and different vendors
could put that at different MMS in the 10-15 range, but i think the
rest is well defined.
Andrew