From: sashiko-bot@kernel.org
To: "Alex Elder" <elder@riscstar.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v2 2/2] net: phy: qcom: qca808x: Add regulator management
Date: Fri, 16 Oct 2026 14:39:05 +0000 [thread overview]
Message-ID: <sashiko-outbox-174466@kernel.org> (raw)
In-Reply-To: <20261015143849.483339-3-elder@riscstar.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] net: phy: qca808x: missing PHY reset pulse after enabling regulators
--
commit e2b47da72c4cf5c697d4c2078b3f0f943b751123
Author: Daniel Thompson <daniel@riscstar.com>
net: phy: qcom: qca808x: Add regulator management
This commit adds logic to power on GPIO-controlled regulators during the
probe of the QCA8081 PHY device. It uses an always-on approach, turning on
regulators if present and sleeping for the reset assert delay.
> diff --git a/drivers/net/phy/qcom/qca808x.c b/drivers/net/phy/qcom/qca808x.c
> index bab26e4c61408..4aba513b9a512 100644
> --- a/drivers/net/phy/qcom/qca808x.c
> +++ b/drivers/net/phy/qcom/qca808x.c
[ ... ]
> @@ -181,15 +182,43 @@ static void qca808x_fill_possible_interfaces(struct phy_device *phydev)
> __set_bit(PHY_INTERFACE_MODE_2500BASEX, possible);
> }
>
> +static int qca808x_power_on(struct phy_device *phydev)
> +{
> + static const char * const regulator_names[] = {
> + "avdd18", "vdd", "vdd18", "vdd125"
> + };
> + struct device *dev = &phydev->mdio.dev;
> + u32 count = 0;
> + int ret;
> +
> + for (u32 i = 0; i < ARRAY_SIZE(regulator_names); i++) {
> + ret = devm_regulator_get_enable_optional(dev, regulator_names[i]);
> + if (!ret)
> + count++;
> + else if (ret != -ENODEV)
> + return ret;
> + }
> +
> + if (count)
> + fsleep(phydev->mdio.reset_assert_delay);
[Severity: High]
Does this sequence successfully initialize the PHY hardware? The driver applies
power here and sleeps for the reset delay, but doesn't seem to explicitly
toggle the reset line.
Since the MDIO core deasserts the reset line before invoking the driver's
probe() callback, the PHY appears to power up with the reset line already
deasserted. Could this regression result in the hardware failing to initialize
properly and leaving a dead link?
Perhaps an explicit assert and deassert (e.g., via phy_device_reset()) is
needed here to provide a valid reset pulse after the power is stable.
> +
> + return 0;
> +}
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261015143849.483339-1-elder@riscstar.com?part=2
prev parent reply other threads:[~2026-10-16 14:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 14:38 [PATCH net-next v2 0/2] net: phy: qcom: add qca808x support Alex Elder
2026-10-15 14:38 ` [PATCH net-next v2 1/2] dt-bindings: net: qca,qca808x: Add regulator properties Alex Elder
2026-10-15 14:38 ` [PATCH net-next v2 2/2] net: phy: qcom: qca808x: Add regulator management Alex Elder
2026-10-15 15:16 ` Maxime Chevallier
2026-10-15 15:40 ` Lorenzo Bianconi
2026-10-15 16:01 ` Alex Elder
2026-10-15 16:27 ` Andrew Lunn
2026-10-15 16:37 ` Mohd Ayaan Anwar
2026-10-16 15:17 ` Andrew Lunn
2026-10-17 8:12 ` Mohd Ayaan Anwar
2026-10-16 14:39 ` sashiko-bot [this message]
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=sashiko-outbox-174466@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=elder@riscstar.com \
--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