Thread (16 messages) 16 messages, 2 authors, 5h ago

Re: [PATCH net-next v2 02/12] ax88179_178a: Add HW support for AX179A-based chips

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-07-14 22:59:01
Also in: linux-usb, lkml

+	/* Initialize MII structure */
+	dev->mii.dev = dev->net;
+	dev->mii.mdio_read = ax88179_mdio_read;
+	dev->mii.mdio_write = ax88179_mdio_write;
+	dev->mii.phy_id_mask = 0xff;
+	dev->mii.reg_num_mask = 0xff;
+	dev->mii.phy_id = 0x03;
+	if (!ax179_data->is_ax88772d)
+		dev->mii.supports_gmii = 1;
O.K, so you are keeping going.

I still think mii has to die, and you need to swap to phylink.

It is a bit ugly, but there is a way around the PHYs having a totally
different API, despite the same ID register values.

Some generation of Marvel Ethernet switches set the OUI part of the
PHY ID register, but left the product part as 0. They even documented
this was intentional. We worked around it by trapping reads to
registers 2 and 3, and filling in the missing information, using an ID
from the marvel range which was not in use. We could then make the
Marvell PHY driver do the right thing.

You can do the same here. Intercept the reads to registers 2 and 3,
and return a different ID. You can then extend the PHY driver.

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