Thread (24 messages) flat view 24 messages, 2 authors, 2d ago

Re: [PATCH net-next v8 15/15] ax88796b: Add support for AX88772D, AX88179A and AX88279

From: Birger Koblitz <hidden>
Date: 2026-08-31 17:28:21
Also in: linux-usb, lkml

On 31/08/2026 4:38 pm, Andrew Lunn wrote:
quoted
+/* AX88179A-based PHYs cannot access MMD registers via MII_MMD_CTRL/MII_MMD_DATA
+ * Make sure to use c45 access instead.
+ */
+static int asix_read_mmd(struct phy_device *phydev, int devnum, u16 reg)
+{
+	struct mii_bus *bus = phydev->mdio.bus;
+	int addr = phydev->mdio.addr;
+
+	return __mdiobus_c45_read(bus, addr, devnum, reg);
+}
+
+static int asix_write_mmd(struct phy_device *phydev, int devnum, u16 reg, u16 val)
+{
+	struct mii_bus *bus = phydev->mdio.bus;
+	int addr = phydev->mdio.addr;
+
+	return __mdiobus_c45_write(bus, addr, devnum, reg, val);
+}
Please see aa63217916e1818a28b711384a9340d965ad073f

     net: phy: add generic helpers for direct C45 MMD access
     
     Some PHYs support direct C45 register access but not C22 indirect MMD
     access (registers 0xD and 0xE). When discovered via C22, phylib routes
     MMD access through the indirect path, which won't work on these
     devices.
     
     Add genphy_read_mmd_c45() and genphy_write_mmd_c45() as read_mmd/
     write_mmd callbacks that bypass the C22 indirect path and use the bus
     C45 accessors directly.
Thanks for pointing this out, Andrew. Will use that helper function
instead in the next round.

Birger
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help