From: netdev-bot+sashiko@kernel.org
To: linusw@kernel.org
Cc: ulli.kroll@googlemail.com, andrew+netdev@lunn.ch,
davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
mirq-linux@rere.qmqm.pl, mhun512@gmail.com, edumazet@kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v7 02/18] net: ethernet: cortina: Keep ports bound for shared IRQ
Date: Wed, 11 Nov 2026 23:10:46 +0000 [thread overview]
Message-ID: <179443864614.2199510.5888649170478225602@kernel.org> (raw)
In-Reply-To: <20261110-gemini-ethernet-fixes-3-v7-2-9c32a1a46aec@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
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] In gemini_ethernet_port_probe()
(drivers/net/ethernet/cortina/gemini.c), the new `if (ret ==…
--
net: ethernet: cortina: Keep ports bound for shared IRQ
The software free queue interrupt is routed through port 1, so this patch
keeps Gemini child ports bound as IRQ-only ports when no PHY is described
or when PHY setup or netdev registration fails. It also publishes a port
to the parent only after it is initialized, under RTNL. Global interrupt
masking moves into the parent probe.
> diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c
> index 0b05a15529832..22c3b6b8e2db5 100644
> --- a/drivers/net/ethernet/cortina/gemini.c
> +++ b/drivers/net/ethernet/cortina/gemini.c
[ ... ]
> @@ -2600,17 +2632,41 @@ static int gemini_ethernet_port_probe(struct platform_device *pdev)
> if (ret)
> goto unprepare;
>
> + if (!of_property_present(np, "phy-handle") &&
> + !of_phy_is_fixed_link(np)) {
> + dev_info(dev, "no PHY\n");
> + goto irq_only;
> + }
> +
> ret = gmac_setup_phy(netdev);
> if (ret) {
> - netdev_err(netdev,
> - "PHY init failed\n");
> - goto unprepare;
> + dev_err(dev, "PHY init failed: %d\n", ret);
> + if (ret == -EPROBE_DEFER)
> + goto unprepare;
> + goto irq_only;
> }
[Severity: Medium]
Can gmac_setup_phy() ever return -EPROBE_DEFER here?
It calls of_phy_get_and_connect() and turns any NULL into -ENODEV:
drivers/net/ethernet/cortina/gemini.c:gmac_setup_phy() {
phy = of_phy_get_and_connect(netdev,
dev->of_node,
gmac_adjust_link);
if (!phy)
return -ENODEV;
...
}
of_phy_get_and_connect() in drivers/net/mdio/of_mdio.c returns NULL for
every failure. That includes of_phy_register_fixed_link() errors. It also
includes of_phy_connect() returning NULL when of_phy_find_device() has not
found the PHY yet. Apart from -ENODEV, gmac_setup_phy() only returns
-EINVAL, for an unsupported interface mode.
Say the MDIO bus probes after the port. Most Gemini boards reference a
virtual,mdio-gpio bus through phy-handle, and CONFIG_MDIO_GPIO=m makes a
late bus more likely. Wouldn't this path then always go to irq_only, set
port->netdev to NULL and return 0?
After that the port is bound without a netdev, and the driver core won't
retry the probe. suppress_bind_attrs = true blocks rebinding from sysfs.
fw_devlink does not order probes on phy-handle, so nothing holds the port
back until the PHY exists.
The -EPROBE_DEFER check after register_netdevice() looks unreachable in
practice too:
if (ret) {
phy_disconnect(netdev->phydev);
dev_err(dev, "netdev registration failed: %d\n", ret);
if (ret == -EPROBE_DEFER)
goto unprepare;
goto irq_only;
}
The commit message says:
Continue to propagate deferred-probe and mandatory resource
errors.
For PHY setup, though, no deferral value seems to reach these checks.
Could gmac_setup_phy() return -EPROBE_DEFER itself? One way would be to
parse phy-handle and return -EPROBE_DEFER when of_phy_find_device()
returns NULL.
Before this patch, the same case returned -ENODEV and the interface was
also lost. So the outcome is no worse, but the new deferral branches don't
seem to do what the commit message describes.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261110-gemini-ethernet-fixes-3-v7-0-9c32a1a46aec%40kernel.org
next prev parent reply other threads:[~2026-11-11 23:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 22:13 [PATCH net-next v7 00/18] net: ethernet: cortina: Fix Gemini RX/TX buffer management Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 01/18] net: ethernet: cortina: Keep shared free queue parent-owned Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 02/18] net: ethernet: cortina: Keep ports bound for shared IRQ Linus Walleij
2026-11-11 23:10 ` netdev-bot+sashiko [this message]
2026-11-10 22:13 ` [PATCH net-next v7 03/18] net: ethernet: cortina: Drain free queue IRQ before resize Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 04/18] net: ethernet: cortina: Normalize free queue pointers on rebuild Linus Walleij
2026-11-11 23:10 ` netdev-bot+sashiko
2026-11-10 22:13 ` [PATCH net-next v7 05/18] net: ethernet: cortina: Correct free queue DMA mappings Linus Walleij
2026-11-11 23:10 ` netdev-bot+sashiko
2026-11-10 22:13 ` [PATCH net-next v7 06/18] net: ethernet: cortina: Index free queue fragments with XArray Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 07/18] net: ethernet: cortina: Preserve in-flight free queue pages Linus Walleij
2026-11-11 23:10 ` netdev-bot+sashiko
2026-11-10 22:13 ` [PATCH net-next v7 08/18] net: ethernet: cortina: Rotate free queue page allocation Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 09/18] net: ethernet: cortina: Recycle claimed free queue pages Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 10/18] net: ethernet: cortina: Validate RX fragment lengths Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 11/18] net: ethernet: cortina: Account RX buffer size in truesize Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 12/18] net: ethernet: cortina: Release partial RX frames on stop Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 13/18] net: ethernet: cortina: Scale Gemini RX queues to system memory Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 14/18] net: ethernet: cortina: Serialize TX completion statistics Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 15/18] net: ethernet: cortina: Scope RX statistics updates Linus Walleij
2026-11-11 23:10 ` netdev-bot+sashiko
2026-11-10 22:13 ` [PATCH net-next v7 16/18] net: ethernet: cortina: Drain RX coalescing timer on stop Linus Walleij
2026-11-11 23:10 ` netdev-bot+sashiko
2026-11-10 22:13 ` [PATCH net-next v7 17/18] net: ethernet: cortina: Reject TX rings smaller than retained pointers Linus Walleij
2026-11-10 22:13 ` [PATCH net-next v7 18/18] net: ethernet: cortina: Fix ethtool statistics reads Linus Walleij
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=179443864614.2199510.5888649170478225602@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=mhun512@gmail.com \
--cc=mirq-linux@rere.qmqm.pl \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ulli.kroll@googlemail.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