Re: [PATCH net-next v4 4/4] net: mdio: mdio-bcm-unimac: Add Clause 45 support
From: Florian Fainelli
Date: Fri Nov 20 2026 - 14:11:09 EST
On 11/19/26 21:38, netdev-bot+sashiko@xxxxxxxxxx wrote:
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 2 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] unimac_mdio_probe() now sets bus->read_c45/bus->write_c45 for
every instance, including the one GENET creates from platform data.
Your analysis is correct: without a DT node nothing is masked, and bcmgenet_mii_wait() sleeps for a timeout per frame since irq0 is only requested in bcmgenet_open(). I'd rather not special-case that path:
- it only affects GENET probed without a DT node (ACPI/UEFI), and it is an one-off cost at probe time, bounded to two failed C45 reads per address
- the C22 scan on that path already pays the same per-frame sleep, so this slows an existing slow path rather than creating a new one
- C45 support is a property of the MDIO controller, not of how the platform device was instantiated, and gating it on DT or on pdata would make the driver's behavior depend on the firmware interface.
The commit message now says that this scan runs there and why it is slower. If the probe time turns out to matter, the fix belongs in bcmgenet_mii_wait(), which should poll while the interrupt is not registered yet. That would speed up the C22 scan as well and I'd rather send it as a separate GENET patch.
- [Medium] The patch's own comment in unimac_mdio_addr_c45() says
bcmgenet_mii_wait() can return 0 after timing out with MDIO_START_BUSY…
Agreed. v5 adds unimac_mdio_wait(), which calls wait_func() and then polls MDIO_START_BUSY. Every cycle goes through it: the ADDR frame, the RD_C45/WR_C45 data frame and the C22 read and write. MDIO_CFG is therefore never rewritten while a frame is in flight, and the read data is never fetched before the frame completes. The commit message explains this.
- [Low] unimac_mdio_resume() now takes priv->mii_bus->mdio_lock around
unimac_mdio_clk_set(), so system resume now serializes against, and…
The commit message already said that resume takes the bus lock around unimac_mdio_clk_set(). v5 also says that resume may now wait for an in-flight MDIO access.
pw-bot: cr
--
Florian