Re: [PATCH net-next v2 09/10] net: dsa: microchip: implement lan937x-specific MDIO registration
From: Bastien Curutchet
Date: Fri Jun 12 2026 - 05:21:46 EST
Hi Paolo,
On 6/11/26 12:54 PM, Paolo Abeni wrote:
On 6/8/26 4:10 PM, Bastien Curutchet (Schneider Electric) wrote:
All the switches use a common mdio_register() function that uses two
ksz_dev_ops callbacks (.mdio_bus_preinit() and .create_phy_addr_map())
to handle the lan937x specific case. These two callbacks are used only
at this place in the code.
Implement a new lan937x-specific MDIO registration functions that uses
these two lan937x-specific functions. The lan937x bindings don't
have any 'interrupts' property so this lan937x_mdio_register() doesn't
call ksz_irq_phy_setup().
Sashiko noted that ksz_irq_phy_setup() manually populate the mii_bus irq
array by mapping the switch's internal port IRQs (PORT_SRC_PHY_INT)
rather than relying on the device tree and stripping ksz_irq_phy_setup()
may lead to regressions.
Is that a false positive?
Yes it is to me. ksz_irq_phy_setup() is currently gated by (dev->irq > 0) which can't be true if no interrupt property is present in the device-tree.
Ok, I didn't know that, I'll do it from now on.
Please note that to help processing the series, you should comment
proactively on the AI reviews finding.
Best regards,
Bastien