RE: [PATCH net-next 3/5] net: phy: Add support for the ADIN1140 PHY
From: Regus, Ciprian
Date: Thu May 21 2026 - 16:25:19 EST
> > +static int adin1140_phy_read_mmd(struct phy_device *phydev, int
> devnum,
> > + u16 regnum)
> > +{
> > + struct mii_bus *bus = phydev->mdio.bus;
> > + int addr = phydev->mdio.addr;
> > +
> > + return __mdiobus_c45_read(bus, addr, devnum, regnum);
> > +}
> > +
> > +static int adin1140_phy_write_mmd(struct phy_device *phydev, int
> devnum,
> > + u16 regnum, u16 val)
> > +{
> > + struct mii_bus *bus = phydev->mdio.bus;
> > + int addr = phydev->mdio.addr;
> > +
> > + return __mdiobus_c45_write(bus, addr, devnum, regnum, val);
> > +}
>
> Why do these exist?
>
The PHY is always probed over C22. Unless read_mmd()/write_mmd() are defined,
phylib will default to indirect accesses to MMD devices. The 0xD and 0xE PHY registers
are not implemented, so those transfers won't have any effect.