mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Haoran Wang <wanghr2026@mail.zgclab.edu.cn>
Cc: chester.a.unal@arinc9.com, daniel@makrotopia.org,
	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
Subject: Re: [PATCH net 5/5] net: dsa: mt7530: disable regulators on mt753x_setup() failure
Date: Tue, 24 Nov 2026 19:50:43 +0100	[thread overview]
Message-ID: <cb1f5ec5-61f9-4513-a80a-c07a37e20e36@lunn.ch> (raw)
In-Reply-To: <179550875790.4156.14185923394520188230@mail.zgclab.edu.cn>

On Tue, Nov 24, 2026 at 04:25:57PM +0800, Haoran Wang wrote:
> mt753x_setup() calls the per-variant sw_setup() (mt7530_setup() for the
> MT7530), which enables the regulators, but the steps that follow returned
> on error without disabling them. The common case is mt7530_setup_irq()
> returning -EPROBE_DEFER, which leaves the rails on and re-enables them on
> every re-probe.
> 
> Route all failure paths after sw_setup() to a shared error label that
> disables the regulators, and move the mdio irq teardown there instead of
> handling it inline.

From an architecture side, this is not great. We have a per-variant
sw_setup() function. To keep things symmetric, there should be a
per-variant sw_teardown() function.

    Andrew


  reply	other threads:[~2026-11-24 18:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  8:25 [PATCH net 0/5] net: dsa: mt7530: fix regulator disable on teardown and error paths Haoran Wang
2026-11-24  8:25 ` [PATCH net 2/5] net: dsa: mt7530: factor out mt7530_disable_pwrs() Haoran Wang
2026-11-24 18:35   ` Andrew Lunn
2026-11-24  8:25 ` [PATCH net 1/5] net: dsa: mt7530: disable regulators on switch teardown Haoran Wang
2026-11-24 18:31   ` Andrew Lunn
2026-11-24  8:25 ` [PATCH net 3/5] net: dsa: mt7530: register the GPIO controller last in setup Haoran Wang
2026-11-24 18:38   ` Andrew Lunn
2026-11-24  8:25 ` [PATCH net 4/5] net: dsa: mt7530: disable regulators on setup failure Haoran Wang
2026-11-24 18:42   ` Andrew Lunn
2026-11-24  8:25 ` [PATCH net 5/5] net: dsa: mt7530: disable regulators on mt753x_setup() failure Haoran Wang
2026-11-24 18:50   ` Andrew Lunn [this message]
2026-11-24  8:33 ` [PATCH net 0/5] net: dsa: mt7530: fix regulator disable on teardown and error paths netdev-bot+sinfo

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=cb1f5ec5-61f9-4513-a80a-c07a37e20e36@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chester.a.unal@arinc9.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=wanghr2026@mail.zgclab.edu.cn \
    /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®