Re: [PATCH net-next] net: dsa: remove OF-based MDIO bus registration from DSA core

From: Vladimir Oltean
Date: Tue Jan 23 2024 - 10:51:15 EST


On Mon, Jan 22, 2024 at 08:33:48AM +0300, Arınç ÜNAL wrote:
> These subdrivers which control switches [with MDIO bus] probed on OF, will
> lose the ability to register the MDIO bus OF-based:
>
> drivers/net/dsa/b53/b53_common.c
> drivers/net/dsa/lan9303-core.c
> drivers/net/dsa/realtek/realtek-mdio.c
> drivers/net/dsa/vitesse-vsc73xx-core.c
>
> These subdrivers let the DSA core driver register the bus:
> - ds->ops->phy_read() and ds->ops->phy_write() are present.
> - ds->user_mii_bus is not populated.
>
> The commit fe7324b93222 ("net: dsa: OF-ware slave_mii_bus") which brought
> OF-based MDIO bus registration on the DSA core driver is reasonably recent
> and, in this time frame, there have been no device trees in the Linux
> repository that started describing the MDIO bus, or dt-bindings defining
> the MDIO bus for the switches these subdrivers control. So I don't expect
> any devices to be affected.

IIUC, Luiz made the original patch for the realtek switches. Shouldn't
we wait until realtek registers ds->user_mii_bus on its own, before
reverting? Otherwise, you're basically saying that Luiz made the DSA
core patch without needing it.