Re: [PATCH net-next 3/3] net: mdio: mdio-bcm-unimac: Add Clause 45 support

From: Nicolai Buchwitz

Date: Tue Nov 17 2026 - 04:32:11 EST


Hi Florian

On 16.11.2026 19:54, Florian Fainelli wrote:

[...]

@@ -301,6 +390,8 @@ static int unimac_mdio_probe(struct platform_device *pdev)
     bus->parent = &pdev->dev;
     bus->read = unimac_mdio_read;
     bus->write = unimac_mdio_write;
+    bus->read_c45 = unimac_mdio_read_c45;
+    bus->write_c45 = unimac_mdio_write_c45;

AFAIU this breaks GENET without DT (e.g. Pi 4 with ACPI). Arguably an edge case,
but last time I tried it worked at least. With your changes all addresses get
a C45 scan there for which the empty ones return -EIO. get_phy_c45_ids() passes
that up instead of mapping it to -ENODEV like the C22 path.

A cheap fix would be to do the same mapping in get_phy_c45_ids() as we have for C22.

OK, are we the only platform where that is happening? Alignment would make sense, and I don't assume we will be breaking someone's use case AFAICT.

The only other I could find ois orion_mdio_xsmi_read_c45 (marvell/mvmdio.c)

Regards
Nicolai