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

From: Arınç ÜNAL
Date: Wed Jan 24 2024 - 00:30:33 EST


On 23.01.2024 18:44, Vladimir Oltean wrote:
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.

My findings point to that. Luiz made the patch to optionally register the
MDIO bus of the MDIO controlled Realtek switches OF-based. So it's not
necessary to wait.

Arınç