mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] net: dsa: mt7530: disable the power rails on setup failure
@ 2026-11-23 11:09 Haoran Wang
  2026-11-23 11:12 ` netdev-bot+sinfo
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Haoran Wang @ 2026-11-23 11:09 UTC (permalink / raw)
  To: chester.a.unal, daniel, andrew, olteanv
  Cc: davem, edumazet, kuba, pabeni, matthias.bgg,
	angelogioacchino.delregno, netdev, linux-arm-kernel,
	linux-mediatek, linux-kernel

mt7530_setup() enables the core and io regulators, but only
mt7530_remove() disables them. A failed probe never reaches .remove(),
so the rails stay enabled on every setup failure path, and the regulator
core warns when devres later puts an enabled regulator. The common case
is mt7530_setup_irq() returning -EPROBE_DEFER, where each re-probe
enables the rails again.

Tie the regulator lifetime to the switch setup/teardown pair. Disable the
rails in mt753x_teardown() and on the mt753x_setup() error paths after
sw_setup() succeeds, and drop the now-redundant disables from
mt7530_remove(). This also avoids an unbalanced disable when a switch in
a multi-switch tree fails setup while already bound. Move
mt7530_setup_gpio() after the FDB flush so the gpiochip is not left
registered when the rails are dropped.

Signed-off-by: Haoran Wang <wanghr2026@mail.zgclab.edu.cn>
---

Changes in v2:
- Address the High severity finding (incomplete fix). Tie the regulator
  lifetime to the setup/teardown pair instead of using local labels in
  mt7530_setup(). The rails are now disabled in mt753x_teardown() and on
  the mt753x_setup() error paths after sw_setup() succeeds, and the
  redundant disables are dropped from mt7530_remove(). This covers the
  -EPROBE_DEFER case in mt7530_setup_irq() and the post-setup
  dsa_switch_setup() and dsa_tree_setup() failures.
- Address the Medium severity finding (unbalanced disable in
  mt7530_remove()). Disabling in teardown, which only runs once the tree
  is actually set up, avoids the second disable for a switch that fails
  setup while it is already bound in a multi-switch tree.
- Address the Low severity finding (gpiochip left registered when the
  rails are dropped). Move mt7530_setup_gpio() after the FDB flush so no
  failure path leaves the gpiochip registered after the rails are disabled.
- Leave the other Low severity finding (assert reset before dropping the
  rails) out of this fix. It is speculative and matches the existing
  mt7530_remove() ordering.


 drivers/net/dsa/mt7530-mdio.c | 14 +--------
 drivers/net/dsa/mt7530.c      | 67 ++++++++++++++++++++++++++++++++-----------
 2 files changed, 51 insertions(+), 30 deletions(-)

diff --git a/drivers/net/dsa/mt7530-mdio.c b/drivers/net/dsa/mt7530-mdio.c
index e85ef2aceee5..faefbcad293f 100644
--- a/drivers/net/dsa/mt7530-mdio.c
+++ b/drivers/net/dsa/mt7530-mdio.c
@@ -227,23 +227,11 @@ static void
 mt7530_remove(struct mdio_device *mdiodev)
 {
 	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
-	int ret = 0, i;
+	int i;
 
 	if (!priv)
 		return;
 
-	if (priv->id == ID_MT7530) {
-		ret = regulator_disable(priv->core_pwr);
-		if (ret < 0)
-			dev_err(priv->dev,
-				"Failed to disable core power: %d\n", ret);
-
-		ret = regulator_disable(priv->io_pwr);
-		if (ret < 0)
-			dev_err(priv->dev, "Failed to disable io pwr: %d\n",
-				ret);
-	}
-
 	mt7530_remove_common(priv);
 
 	for (i = 0; i < 2; ++i)
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index d5a199293f78..5bbeed0491c4 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2376,6 +2376,16 @@ mt7530_setup_mdio(struct mt7530_priv *priv)
 	return ret;
 }
 
+static void
+mt7530_disable_pwrs(struct mt7530_priv *priv)
+{
+	if (priv->id != ID_MT7530)
+		return;
+
+	regulator_disable(priv->core_pwr);
+	regulator_disable(priv->io_pwr);
+}
+
 static int
 mt7530_setup(struct dsa_switch *ds)
 {
@@ -2425,7 +2435,7 @@ mt7530_setup(struct dsa_switch *ds)
 		if (ret < 0) {
 			dev_err(priv->dev, "Failed to enable io pwr: %d\n",
 				ret);
-			return ret;
+			goto err_disable_core_pwr;
 		}
 	}
 
@@ -2447,20 +2457,22 @@ mt7530_setup(struct dsa_switch *ds)
 				       val != 0, 20, 1000000);
 	if (ret < 0) {
 		dev_err(priv->dev, "reset timeout\n");
-		return ret;
+		goto err_disable_pwrs;
 	}
 
 	regmap_read(priv->regmap, MT7530_CREV, &id);
 	id = FIELD_GET(CHIP_NAME_MASK, id);
 	if (id != MT7530_ID) {
 		dev_err(priv->dev, "chip %x can't be supported\n", id);
-		return -ENODEV;
+		ret = -ENODEV;
+		goto err_disable_pwrs;
 	}
 
 	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_20MHZ) {
 		dev_err(priv->dev,
 			"MT7530 with a 20MHz XTAL is not supported!\n");
-		return -EINVAL;
+		ret = -EINVAL;
+		goto err_disable_pwrs;
 	}
 
 	/* Reset the switch through internal reset */
@@ -2527,7 +2539,7 @@ mt7530_setup(struct dsa_switch *ds)
 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
 	ret = mt7530_setup_vlan0(priv);
 	if (ret)
-		return ret;
+		goto err_disable_pwrs;
 
 	/* Check for PHY muxing on port 5 */
 	if (dsa_is_unused_port(ds, 5)) {
@@ -2554,7 +2566,7 @@ mt7530_setup(struct dsa_switch *ds)
 				if (ret && ret != -ENODEV) {
 					of_node_put(mac_np);
 					of_node_put(phy_node);
-					return ret;
+					goto err_disable_pwrs;
 				}
 				id = of_mdio_parse_addr(ds->dev, phy_node);
 				if (id == 0)
@@ -2575,20 +2587,31 @@ mt7530_setup(struct dsa_switch *ds)
 		}
 	}
 
+	/* Flush the FDB table */
+	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
+	if (ret < 0)
+		goto err_disable_pwrs;
+
 #ifdef CONFIG_GPIOLIB
 	if (of_property_read_bool(priv->dev->of_node, "gpio-controller")) {
 		ret = mt7530_setup_gpio(priv);
 		if (ret)
-			return ret;
+			goto err_disable_pwrs;
 	}
 #endif /* CONFIG_GPIOLIB */
 
-	/* Flush the FDB table */
-	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
-	if (ret < 0)
-		return ret;
-
 	return 0;
+
+err_disable_pwrs:
+	mt7530_disable_pwrs(priv);
+
+	return ret;
+
+err_disable_core_pwr:
+	if (priv->id == ID_MT7530)
+		regulator_disable(priv->core_pwr);
+
+	return ret;
 }
 
 static int
@@ -3205,11 +3228,11 @@ mt753x_setup(struct dsa_switch *ds)
 
 	ret = mt7530_setup_irq(priv);
 	if (ret)
-		return ret;
+		goto err_disable_pwrs;
 
 	ret = mt7530_setup_mdio(priv);
 	if (ret)
-		return ret;
+		goto err_disable_pwrs;
 
 	/* Initialise the PCS devices */
 	for (i = 0; i < priv->ds->num_ports; i++) {
@@ -3221,15 +3244,23 @@ mt753x_setup(struct dsa_switch *ds)
 	if (priv->create_sgmii)
 		ret = priv->create_sgmii(priv);
 
-	if (ret && priv->irq_domain)
-		mt7530_free_mdio_irq(priv);
+	if (ret) {
+		if (priv->irq_domain)
+			mt7530_free_mdio_irq(priv);
+		goto err_disable_pwrs;
+	}
 
-	if (!ret && priv->bus) {
+	if (priv->bus) {
 		mt7530_stats_refresh(priv);
 		schedule_delayed_work(&priv->stats_work,
 				      MT7530_STATS_POLL_INTERVAL);
 	}
 
+	return 0;
+
+err_disable_pwrs:
+	mt7530_disable_pwrs(priv);
+
 	return ret;
 }
 
@@ -3240,6 +3271,8 @@ mt753x_teardown(struct dsa_switch *ds)
 
 	if (priv->bus)
 		cancel_delayed_work_sync(&priv->stats_work);
+
+	mt7530_disable_pwrs(priv);
 }
 
 static int mt753x_set_mac_eee(struct dsa_switch *ds, int port,


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] net: dsa: mt7530: disable the power rails on setup failure
  2026-11-23 11:09 [PATCH v2] net: dsa: mt7530: disable the power rails on setup failure Haoran Wang
@ 2026-11-23 11:12 ` netdev-bot+sinfo
  2026-11-23 11:24   ` 王浩然
  2026-11-23 21:40 ` Andrew Lunn
  2026-11-24 12:05 ` netdev-bot+sashiko
  2 siblings, 1 reply; 5+ messages in thread
From: netdev-bot+sinfo @ 2026-11-23 11:12 UTC (permalink / raw)
  To: Haoran Wang
  Cc: chester.a.unal, daniel, andrew, olteanv, davem, edumazet, kuba,
	pabeni, matthias.bgg, angelogioacchino.delregno, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

 - Whether the issue was actually triggered, or is only theoretical
   (e.g. found by LLM and not proven at runtime). If it was triggered
   please include the symptoms, like the stack trace or kernel messages.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.

*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
-- 
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: [PATCH v2] net: dsa: mt7530: disable the power rails on setup failure
  2026-11-23 11:12 ` netdev-bot+sinfo
@ 2026-11-23 11:24   ` 王浩然
  0 siblings, 0 replies; 5+ messages in thread
From: 王浩然 @ 2026-11-23 11:24 UTC (permalink / raw)
  To: netdev-bot+sinfo
  Cc: chester.a.unal, daniel, andrew, olteanv, davem, edumazet, kuba,
	pabeni, matthias.bgg, angelogioacchino.delregno, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

- How it was discovered. Static scanning, not a runtime report. I
scanned for regulator_enable() calls and checked that each one has a
matching regulator_disable() on the error paths. mt7530_setup()
enables the core and io rails, but only mt7530_remove() disables them,
so a probe that fails after the enable has no matching disable.
- Whether it was triggered. It was not triggered, and I did not
reproduce it on hardware. 


Thanks,
Haoran


> -----原始邮件-----
> 发件人: netdev-bot+sinfo@kernel.org
> 发送时间:2026-11-23 19:12:38 (星期一)
> 收件人: "Haoran Wang" <wanghr2026@mail.zgclab.edu.cn>
> 抄送: chester.a.unal@arinc9.com, daniel@makrotopia.org, andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
> 主题: Re: [PATCH v2] net: dsa: mt7530: disable the power rails on setup failure
> 
> Hi!
> 
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
> 
>  - How the issue was discovered, e.g. hit in production, hit during
>    development, syzbot report, manual code inspection, LLM or static
>    analysis tool scan.
> 
>  - Whether the issue was actually triggered, or is only theoretical
>    (e.g. found by LLM and not proven at runtime). If it was triggered
>    please include the symptoms, like the stack trace or kernel messages.
> 
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account.
> 
> *IMPORTANT*: If you do repost (for other reasons) - please include
> the relevant info in the cover letter or commit messages.
> -- 
> The evaluation is done by an LLM so it may be wrong, if you think
> that is the case please reply and explain.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] net: dsa: mt7530: disable the power rails on setup failure
  2026-11-23 11:09 [PATCH v2] net: dsa: mt7530: disable the power rails on setup failure Haoran Wang
  2026-11-23 11:12 ` netdev-bot+sinfo
@ 2026-11-23 21:40 ` Andrew Lunn
  2026-11-24 12:05 ` netdev-bot+sashiko
  2 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2026-11-23 21:40 UTC (permalink / raw)
  To: Haoran Wang
  Cc: chester.a.unal, daniel, olteanv, davem, edumazet, kuba, pabeni,
	matthias.bgg, angelogioacchino.delregno, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

On Mon, Nov 23, 2026 at 07:09:13PM +0800, Haoran Wang wrote:
> mt7530_setup() enables the core and io regulators, but only
> mt7530_remove() disables them. A failed probe never reaches .remove(),
> so the rails stay enabled on every setup failure path, and the regulator
> core warns when devres later puts an enabled regulator. The common case
> is mt7530_setup_irq() returning -EPROBE_DEFER, where each re-probe
> enables the rails again.
> 
> Tie the regulator lifetime to the switch setup/teardown pair. Disable the
> rails in mt753x_teardown() and on the mt753x_setup() error paths after
> sw_setup() succeeds, and drop the now-redundant disables from
> mt7530_remove(). This also avoids an unbalanced disable when a switch in
> a multi-switch tree fails setup while already bound. Move
> mt7530_setup_gpio() after the FDB flush so the gpiochip is not left
> registered when the rails are dropped.
> 
> Signed-off-by: Haoran Wang <wanghr2026@mail.zgclab.edu.cn>

Please break this patch up into lots of small patches, with good
commit messages, which are obviously correct.

taerdown is the opposite of setup. So do that code movement as one
patch.

Then add patches to fix the missing error handling.

> -	if (priv->id == ID_MT7530) {
> -		ret = regulator_disable(priv->core_pwr);
> -		if (ret < 0)
> -			dev_err(priv->dev,
> -				"Failed to disable core power: %d\n", ret);
> -
> -		ret = regulator_disable(priv->io_pwr);
> -		if (ret < 0)
> -			dev_err(priv->dev, "Failed to disable io pwr: %d\n",
> -				ret);
> -	}

This prints error messages when things go wrong.

> +static void
> +mt7530_disable_pwrs(struct mt7530_priv *priv)
> +{
> +	if (priv->id != ID_MT7530)
> +		return;
> +
> +	regulator_disable(priv->core_pwr);
> +	regulator_disable(priv->io_pwr);

This does not. Why? If you add this helper as a little patch, you can
explain in the commit message why you decided to throw away the error
messages.

> +	/* Flush the FDB table */
> +	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
> +	if (ret < 0)
> +		goto err_disable_pwrs;
> +
>  #ifdef CONFIG_GPIOLIB
>  	if (of_property_read_bool(priv->dev->of_node, "gpio-controller")) {
>  		ret = mt7530_setup_gpio(priv);
>  		if (ret)
> -			return ret;
> +			goto err_disable_pwrs;
>  	}
>  #endif /* CONFIG_GPIOLIB */
>  
> -	/* Flush the FDB table */
> -	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
> -	if (ret < 0)
> -		return ret;

This move should be one patch, and the commit message explaining why.

> +
> +err_disable_pwrs:
> +	mt7530_disable_pwrs(priv);
> +
> +	return ret;
> +
> +err_disable_core_pwr:
> +	if (priv->id == ID_MT7530)
> +		regulator_disable(priv->core_pwr);
> +
> +	return ret;

Having two error cleanup blocks of code with a return is very
unusual. Look at other cleanup blocks. How often do you see this?
Please make it have just one return statement.

> -	if (ret && priv->irq_domain)
> -		mt7530_free_mdio_irq(priv);
> +	if (ret) {
> +		if (priv->irq_domain)
> +			mt7530_free_mdio_irq(priv);
> +		goto err_disable_pwrs;
> +	}

Since you are adding error cleanup at the end of the function, move
this to the end as well.

    Andrew

---
pw-bot: cr

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] net: dsa: mt7530: disable the power rails on setup failure
  2026-11-23 11:09 [PATCH v2] net: dsa: mt7530: disable the power rails on setup failure Haoran Wang
  2026-11-23 11:12 ` netdev-bot+sinfo
  2026-11-23 21:40 ` Andrew Lunn
@ 2026-11-24 12:05 ` netdev-bot+sashiko
  2 siblings, 0 replies; 5+ messages in thread
From: netdev-bot+sashiko @ 2026-11-24 12:05 UTC (permalink / raw)
  To: wanghr2026
  Cc: chester.a.unal, daniel, andrew, olteanv, davem, edumazet, kuba,
	pabeni, matthias.bgg, angelogioacchino.delregno, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

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

Critical: 0 · High: 1 · Medium: 0 · Low: 2

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 commit message says moving mt7530_setup_gpio() after the FDB
  flush means "the gpiochip is not left registered when the rails are…
- [Low] The patch fixes a runtime bug: regulators stay enabled on
  mt7530_setup()/mt753x_setup() failure, enable_count grows on each…
- [Low] The new power-down helper mt7530_disable_pwrs() drops core_pwr
  and io_pwr without first asserting the chip reset.

--

net: dsa: mt7530: disable the power rails on setup failure

This patch moves the MT7530 core/io regulator disable out of
mt7530_remove(). The rails are now disabled in mt753x_teardown() and on
the mt7530_setup()/mt753x_setup() error paths. It also moves
mt7530_setup_gpio() after the FDB flush in mt7530_setup().

> Signed-off-by: Haoran Wang <wanghr2026@mail.zgclab.edu.cn>

[Severity: Low]

This fixes a regulator core WARN and an unbalanced regulator_disable() in
mt7530_remove(), but there is no Fixes: tag.

git blame shows that the regulator_enable() calls in mt7530_setup(), with
their bare return ret error paths, come from:

ddda1ac116c8 ("net: dsa: mt7530: support the 7530 switch on the Mediatek MT7621 SoC")

That commit restructured code first added in:

b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")

Should one of these be added as a Fixes: tag? The recent fix to the same
regulator handling, c2cdef41e0b4 ("net: dsa: mt7530: fix NULL dereference
on unbind of MT7531 and MT7621"), carries one.

> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
> index d5a199293f78a..5bbeed0491c45 100644
> --- a/drivers/net/dsa/mt7530.c
> +++ b/drivers/net/dsa/mt7530.c
> @@ -2376,6 +2376,16 @@ mt7530_setup_mdio(struct mt7530_priv *priv)
>  	return ret;
>  }
>  
> +static void
> +mt7530_disable_pwrs(struct mt7530_priv *priv)
> +{
> +	if (priv->id != ID_MT7530)
> +		return;
> +
> +	regulator_disable(priv->core_pwr);
> +	regulator_disable(priv->io_pwr);
> +}

[Severity: Low]

Should reset be asserted here before the rails are dropped?

mt7530_probe() requests the reset GPIO with GPIOD_OUT_LOW, so reset is
asserted while the chip is unpowered. mt7530_setup() then pulses reset and
leaves it deasserted:

	gpiod_set_value_cansleep(priv->reset, 0);
	usleep_range(5000, 5100);
	gpiod_set_value_cansleep(priv->reset, 1);

Every new caller of mt7530_disable_pwrs() cuts io_pwr and core_pwr with
reset still deasserted. That covers the err_disable_pwrs labels in
mt7530_setup() after the reset pulse, the mt753x_setup() error paths, and
mt753x_teardown().

The SoC then keeps driving the inactive level into the RESET pad of a chip
whose IO rail is off, and this repeats on every -EPROBE_DEFER re-probe.
The MCM path also never calls reset_control_assert() before power-off.

The v2 notes say this was left out because it matches the old
mt7530_remove() ordering. However, this patch adds several new power-down
points. Would asserting reset first, then disabling io_pwr and core_pwr,
better mirror the power-up sequence?

[ ... ]

> @@ -3205,11 +3228,11 @@ mt753x_setup(struct dsa_switch *ds)
>  
>  	ret = mt7530_setup_irq(priv);
>  	if (ret)
> -		return ret;
> +		goto err_disable_pwrs;
>  
>  	ret = mt7530_setup_mdio(priv);
>  	if (ret)
> -		return ret;
> +		goto err_disable_pwrs;

[Severity: High]

The commit message says:

  Move mt7530_setup_gpio() after the FDB flush so the gpiochip is not left
  registered when the rails are dropped.

and the v2 notes say "no failure path leaves the gpiochip registered after
the rails are disabled". Does that hold on these paths?

mt7530_setup_gpio() is now the last step of mt7530_setup(), so the reorder
only covers the FDB flush failure. When mt7530_setup_irq() fails here, for
example with -EPROBE_DEFER from of_irq_get(), the gpiochip is already
registered through devm:

mt7530_setup_gpio() {
    ...
    return devm_gpiochip_add_data(dev, gc, priv);
}

err_disable_pwrs then calls mt7530_disable_pwrs() while the gpiochip is
still registered. The commit message calls -EPROBE_DEFER the common case.

On the mt7530_setup_mdio() failure path, mt7530_setup_irq() has also
already registered the regmap IRQ chip and its threaded handler:

	ret = devm_regmap_add_irq_chip_fwnode(dev, dev_fwnode(dev),
					      priv->regmap, irq,
					      IRQF_ONESHOT,
					      0, &mt7530_regmap_irq_chip,
					      &irq_data);

The new mt7530_disable_pwrs() call in mt753x_teardown() has the same
problem. DSA calls teardown from the teardown label in dsa_switch_setup()
when tag protocol or user MDIO bus setup fails. It also runs on any tree
teardown, through:

dsa_tree_teardown()->dsa_tree_teardown_switches()->dsa_switch_teardown()

In all of these cases three resources stay registered while the rails are
cut: the gpiochip, the regmap IRQ chip, and the internal MDIO bus from
devm_of_mdiobus_register(). Their lifetime is tied to device bind, not to
DSA setup/teardown.

In a multi-switch tree, unbinding another switch tears this switch down
while it stays bound. The registered-but-unpowered state then lasts for as
long as this switch stays bound. Before this patch the rails stayed on in
these cases.

Can a gpiochip consumer (mt7530_gpio_get(), mt7530_gpio_set() and the
direction callbacks), the regmap-irq threaded handler, or a PHY on the MDIO
bus then issue regmap/MDIO accesses to an unpowered chip?

Would this need explicit unregistration in teardown and on these error
paths, using non-devm registration or the devm_*_release helpers, instead
of the reorder? If not, could the commit message and the v2 notes be
corrected?

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/179543215348.11880.18316180385674365789%40mail.zgclab.edu.cn

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-24 12:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 11:09 [PATCH v2] net: dsa: mt7530: disable the power rails on setup failure Haoran Wang
2026-11-23 11:12 ` netdev-bot+sinfo
2026-11-23 11:24   ` 王浩然
2026-11-23 21:40 ` Andrew Lunn
2026-11-24 12:05 ` netdev-bot+sashiko

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®