Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Robert Marko" <robert.marko@sartura.hr>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/5] net: phy: mxl-gpy: add MxL86211C MDIO I/O regulator
Date: Thu, 01 Oct 2026 12:23:32 +0000	[thread overview]
Message-ID: <20261001122332.8351D1F00899@smtp.kernel.org> (raw)
In-Reply-To: <20260930122305.293686-2-robert.marko@sartura.hr>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] phy: mxl-gpy: MDIO voltage configuration is lost upon PHY hard reset
--

commit 438b87726bd21719eabd6b5d16a0da13d7bc0f33
Author: Robert Marko <robert.marko@sartura.hr>

net: phy: mxl-gpy: add MxL86211C MDIO I/O regulator

This commit models the MxL86211C MDIO I/O voltage setting as a regulator. It
registers a regulator during probe to configure the MDIO pads for 1.8V or
3.3V signaling based on board requirements.

> diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
> --- a/drivers/net/phy/mxl-gpy.c
> +++ b/drivers/net/phy/mxl-gpy.c

[ ... ]

> @@ -390,6 +396,72 @@ static int gpy_probe(struct phy_device *phydev)

[ ... ]

> +static int mxl86211c_probe(struct phy_device *phydev)
> +{
> +	struct device *dev = &phydev->mdio.dev;
> +	struct regulator_config config = { };
> +	struct regulator_dev *rdev;
> +	int ret;
> +
> +	ret = gpy_probe(phydev);
> +	if (ret)
> +		return ret;
> +
> +	config.dev = dev;
> +	config.driver_data = phydev;
> +
> +	rdev = devm_regulator_register(dev, &mxl86211c_mdio_desc, &config);

[Severity: High]
Does the initialization and reset recovery path (such as the config_init
callback) need a way to restore the MDIO voltage regulator state?

When the MAC driver or PHY framework toggles the PHY reset GPIO (for example,
during interface up/down or suspend/resume), the PHY's internal registers are
cleared. The phy_init_hw() function will then call the PHY's config_init
callback.

Because the voltage is applied by the regulator framework's constraint
evaluation exactly once here during probe, the regulator core is unaware
of the hardware reset and does not re-apply the voltage.

If the board uses 1.8V, the PHY falling back to 3.3V MDIO signaling after
reset could cause a mismatch, leading to unreliable MDIO communication and
making the PHY inaccessible.

> +	if (IS_ERR(rdev)) {
> +		phydev_err(phydev, "failed to register MDIO regulator\n");
> +		return PTR_ERR(rdev);
> +	}
> +
> +	return 0;
> +}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260930122305.293686-1-robert.marko@sartura.hr?part=2

  reply	other threads:[~2026-10-01 12:23 UTC|newest]

Thread overview: 22+ 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-01 12:23   ` sashiko-bot [this message]
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-01 12:23   ` sashiko-bot
2026-10-04 13:17   ` netdev-bot+sashiko
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-07  8:49         ` Robert Marko
2026-10-07 13:14           ` 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-01 12:23   ` sashiko-bot
2026-10-04 13:17   ` netdev-bot+sashiko
2026-10-01 12:23 ` [PATCH 1/5] dt-bindings: net: maxlinear: add MxL86211C MDIO I/O regulator sashiko-bot
2026-10-04 13:17 ` 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=20261001122332.8351D1F00899@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robert.marko@sartura.hr \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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