Re: [PATCH net-next 0/3] net: enetc: add port MDIO support for both i.MX94 and i.MX95

From: Andrew Lunn

Date: Mon Nov 03 2025 - 08:17:33 EST


> > So you have up to 32 virtual MDIO busses stacked on top of one
>
> Theoretically, there are up to 33 virtual MDIO buses, 32 port MDIO +
> 1 'EMDIO function'. The EMDIO function can access all the PHYs on
> the physical MDIO bus.

The EMDIO function sound dangerous. All the locking and PHY drivers
assume they have exclusive access to a devices on the bus. Bad things
will happen if they don't. And given how infrequently MDIO is
typically used, such bugs are going to be hard to find.

You might want to make the 32 port MDIOs and the EMDIO mutually
exclusive, so you can eliminate those potential bugs.

Andrew