Re: [PATCH net v5 2/2] net: phy: restore the interrupt phy_probe() replaced with PHY_POLL

From: Andrew Lunn

Date: Mon Sep 07 2026 - 21:11:43 EST


> @@ -591,6 +591,8 @@ struct phy_oatc14_sqi_capability {
> * - Bits [31:24] are reserved for defining generic
> * PHY driver behavior.
> * @irq: IRQ number of the PHY's interrupt (-1 if none)
> + * @irq_saved: @irq as it was before phy_probe() replaced it with PHY_POLL,
> + * or PHY_POLL when there is nothing to restore

I don't really like this. We should bite the bullet and make
mdiobus->irq[] the source of truth. It does not look too bad:

usb/lan78xx.c has an mdiobus.

/* if phyirq is not set, use polling mode in phylib */
if (dev->domain_data.phyirq > 0)
phydev->irq = dev->domain_data.phyirq;
else
phydev->irq = PHY_POLL;
netdev_dbg(dev->net, "phydev->irq = %d\n", phydev->irq);

ret = phylink_connect_phy(dev->phylink, phydev);

This can be changed to set the value in the mdio bus structure.

usb/smsc95xx.c: You have direct access to the mdiobus, the same
function just registered it.

ethernet/freescale/ucc_geth.c: This is about WoL, so no change needed.

ethernet/xscale/ixp4xx_eth.c: Appears to be pointless
ethernet/qualcomm/emac/emac-mac.c: Also pointless
ethernet/asix/ax88796c_main.c: More pointlessness
ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c: Pointless in a different way

ethernet/broadcom/asp2/bcmasp_intf.c,
ethernet/broadcom/genet/bcmmii.c, ethernet/engleder/tsnep_main.c all
set PHY_MAC_INTERRUPT. genphy should not need to touch that.

ethernet/stmicro/stmmac/stmmac_mdio.c: One of the previous types of pointless.

So please work on these.

Andrew