From: Andrew Lunn <andrew@lunn.ch>
To: Aleksei Sviridkin <f@lex.la>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, olteanv@gmail.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v5 2/2] net: phy: restore the interrupt phy_probe() replaced with PHY_POLL
Date: Tue, 8 Sep 2026 03:09:21 +0200 [thread overview]
Message-ID: <8f67d3ba-ce25-49bf-8378-c76d748879a9@lunn.ch> (raw)
In-Reply-To: <20260906174643.4107607-3-f@lex.la>
> @@ -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
next prev parent reply other threads:[~2026-09-08 1:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 17:46 [PATCH net v5 0/2] net: fix a stale phylink PHY pointer and a lost PHY interrupt Aleksei Sviridkin
2026-09-06 17:46 ` [PATCH net v5 1/2] net: phylink: unwind the PHY binding when bringup fails late Aleksei Sviridkin
2026-09-09 12:49 ` netdev-bot+sashiko
2026-09-06 17:46 ` [PATCH net v5 2/2] net: phy: restore the interrupt phy_probe() replaced with PHY_POLL Aleksei Sviridkin
2026-09-08 1:09 ` Andrew Lunn [this message]
2026-09-09 12:49 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8f67d3ba-ce25-49bf-8378-c76d748879a9@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f@lex.la \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox