mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: robert.marko@sartura.hr
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, hkallweit1@gmail.com,
	lxu@maxlinear.com, michael@walle.cc, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	luka.perkov@sartura.hr
Subject: Re: [PATCH 3/5] net: phy: mxl-gpy: release MxL86211C Super Isolate
Date: Sun, 04 Oct 2026 13:17:41 +0000	[thread overview]
Message-ID: <179111986196.434549.4683250107533877836@kernel.org> (raw)
In-Reply-To: <20260930122305.293686-3-robert.marko@sartura.hr>

Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 1 · Medium: 0 · 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).

- [High] The patch clears Super Isolate only once, in mxl86211c_probe()
  (drivers/net/phy/mxl-gpy.c:459-463).

--

net: phy: mxl-gpy: release MxL86211C Super Isolate

This commit clears VSPEC1_PM_CTRL.SI in mxl86211c_probe() so that a
MxL86211C strapped into Super Isolate mode gets released. The clear
happens after the MDIO voltage regulator is registered, and gpy_probe()
now runs after it.

> diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
> index 4cbbfae046317..790075632fc3f 100644
> --- a/drivers/net/phy/mxl-gpy.c
> +++ b/drivers/net/phy/mxl-gpy.c

[ ... ]

> @@ -459,7 +456,15 @@ static int mxl86211c_probe(struct phy_device *phydev)
>  		return PTR_ERR(rdev);
>  	}
>  
> -	return 0;
> +	ret = phy_modify_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_PM_CTRL,
> +			     VSPEC1_PM_CTRL_SI,
> +			     0);

[Severity: High]
Can the PHY end up back in Super Isolate after a later hardware reset?

The commit message says the strap leaves "the PHY halted after reset until
software releases it". However, SI is only cleared here in probe, and
probe runs once per driver bind.

On boards that have a PHY reset-gpio or reset controller, phylib can
pulse the reset line after probe. phy_detach_internal() asserts it:

drivers/net/phy/phy_device.c:phy_detach_internal() {
    ...
	/* Assert the reset signal */
	phy_device_reset(phydev, 1);
    ...
}

On the next attach or resume, phy_init_hw() releases reset. After that it
only calls soft_reset (this PHY has none) and config_init:

drivers/net/phy/phy_device.c:phy_init_hw() {
	/* Deassert the reset signal */
	phy_device_reset(phydev, 0);
    ...
	if (phydev->drv->config_init) {
		ret = phydev->drv->config_init(phydev);
    ...
}

The MxL86211C entry in genphy_driver[] uses gpy21x_config_init() as its
.config_init. That function only sets possible_interfaces and writes
PHY_ERRCNT, and nothing else in the driver clears VSPEC1_PM_CTRL_SI.

Take a MAC driver that connects the PHY in ndo_open and disconnects it in
ndo_stop. Wouldn't an "ip link set dev X down; ip link set dev X up"
cycle bring the PHY back isolated, with no link until the driver is
rebound?

The same could happen on a resume that power-cycles the PHY, because
mdio_bus_phy_resume() also goes through phy_init_hw().

Later in the series, "net: phy: mxl-gpy: support MxL86211C lane mapping"
adds mxl86211c_config_init(). It only calls
mxl86211c_configure_lane_asp_map() and gpy21x_config_init(), so the SI
clear is still only done in probe at the end of the series.

Would it be better to clear SI in a MxL86211C-specific config_init, so
that it runs after every phy_init_hw()?

> +	if (ret)
> +		return ret;
> +
> +	ret = gpy_probe(phydev);
> +
> +	return ret;
>  }

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260930122305.293686-1-robert.marko%40sartura.hr

  reply	other threads:[~2026-10-04 13:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 12:22 [PATCH 1/5] dt-bindings: net: maxlinear: add MxL86211C MDIO I/O regulator Robert Marko
2026-09-30 12:22 ` [PATCH 2/5] net: phy: mxl-gpy: " Robert Marko
2026-10-04 13:17   ` netdev-bot+sashiko
2026-09-30 12:22 ` [PATCH 3/5] net: phy: mxl-gpy: release MxL86211C Super Isolate Robert Marko
2026-10-04 13:17   ` netdev-bot+sashiko [this message]
2026-09-30 12:22 ` [PATCH 4/5] dt-bindings: net: maxlinear: add MxL86211C lane mapping support Robert Marko
2026-10-01  5:55   ` Krzysztof Kozlowski
2026-10-01 12:14     ` Robert Marko
2026-10-01 12:33       ` Andrew Lunn
2026-10-01 16:25   ` Rob Herring (Arm)
2026-10-04 13:17   ` netdev-bot+sashiko
2026-09-30 12:22 ` [PATCH 5/5] net: phy: mxl-gpy: support MxL86211C lane mapping Robert Marko
2026-09-30 15:35   ` Andrew Lunn
2026-09-30 16:58     ` Robert Marko
2026-10-04 13:17   ` netdev-bot+sashiko
2026-10-04 13:17 ` [PATCH 1/5] dt-bindings: net: maxlinear: add MxL86211C MDIO I/O regulator 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=179111986196.434549.4683250107533877836@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luka.perkov@sartura.hr \
    --cc=lxu@maxlinear.com \
    --cc=michael@walle.cc \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robert.marko@sartura.hr \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®