🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22032

Re: [PATCH net 5/5] net: dsa: mt7530: disable regulators on mt753x_setup() failure

#22032
From: Andrew Lunn
Date: Tue, 24 Nov 2026 18:50
17 lines
9029 bytes
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
Technical Details
Message-ID: <cb1f5ec5-61f9-4513-a80a-c07a37e20e36@lunn.ch>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370690-linux-kernel-netdev=dewy.ru
References: <179550875789.4156.361477684651496992@mail.zgclab.edu.cn> <179550875790.4156.14185923394520188230@mail.zgclab.edu.cn>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370690-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 5/5] net: dsa: mt7530: disable regulators on mt753x_setup() failure
Date: Tue, 24 Nov 2026 19:50:43 +0100
Organization: Usenet Network
Message-ID: <cb1f5ec5-61f9-4513-a80a-c07a37e20e36@lunn.ch>
References: <179550875789.4156.361477684651496992@mail.zgclab.edu.cn> <179550875790.4156.14185923394520188230@mail.zgclab.edu.cn>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network; logging-data="13675"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:xuSGxWIa7pdiOv/o9s4d8VSQ2Jk= sha256:8Vyt12DcPnVD+/6CP+BxYq5IZEJ3SPy8Etn+1mNt0Vg= sha1:oWF5psus+XK/rK5tEFCk4wxahyQ= sha256:Fet+d73dU43bkutLSi9VfB/IJeiiZ2zvGeOtoILZNFY=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 2BF6A125E2C; Tue, 24 Nov 2026 21:51:25 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=lunn.ch
X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sJutJ-ZI7qJM; Tue, 24 Nov 2026 21:51:21 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-370690-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id ED3F2125E29; Tue, 24 Nov 2026 21:51:10 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 84941365C8; Tue, 24 Nov 2026 18:51:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795546268; b=eeeASlWyXJHqMJtJyuftnLaMUcYEPhK9936xKxdGTtN5vKvsYezx2311Hyp6FiqmmWzg v1fBTgVQcpVWUW/mmS97MepBrOXZsaZbMro6rZAtUzneIl8odlTbaYfzOmE39Wn5EVsGX VDt5lqinzy6MGEwpixxSzURTrie/akxms3z1ehkX9CHQfZEj8SEZCB9Z5JQL1fCQs5yqQ bUzN0i4Ielx6AnuopPDzoU4NVcWyQyFjuph/PifVSP5aLctKlyQ7E6eedYi1Sv21F0f4o UgIdeUJ48RuRdWFuFFCWTlifKt5XgMvz3RcuWf2O6ibUA/9cdo6oQwpOUWSp4ZPUMmg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795546268; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=BB4dvpr20SC5e/Tv9sGOQ+I4hmkO5OM8JeoWCYxHvq4=; b=XuRi7iv6QUtwDZCfCH43vqsABYt2aggdlRU+05UideFUs73gE9XdrrxR3mjQTqZIb7fa x6YW1/jjOlP1Yd0ZRm1bpW+LTCk8Lc/KFa1reseq32EHm73MwxUCWUnETtmC0pNn9l6Gg eYp5lxutG8aUL7GktT21iUZm8paOCVwAWXcKaEA7gpXho2xSRI5PX/lU/lwEaStfCvSVe L/LghJ4fJmRp6OZFwD2zqAaqtyrNMPbnn3wZqPsLUiSbNh3nEYnYlB84sCTTjDhaFO3NG 0NC5sRztzW/Hd2BD+dkGoNJuPOAMgTog0c7vkINtScEKCwrdcYqVuWNNmuxsMoCeiew==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=ddPmOKDQ; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFB30606A32C; Tue, 24 Nov 2026 18:51:07 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=ddPmOKDQ
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795546262; b=Y6OpPAdVfdu35QrreiQ3tWXy0YsH1brxrDOV9fpDTeSA8MPSR3/ZtyJeCY9vVOo+6GXq 5zy6Y3tnU8FFaAd3iOvcZ6fJUpUn6pJEJnZQ7G1S82JXhFk2A8njbyVvMDR/JWacCdhr7 MeIBVHoz43kYM+ZjgHCs1kyqliwgeSVD8mzlaA2BV43mc8MiyrAP7DmHECm8ChXeuBgzC Lw1r4bnEwCMVRseFx/qtowrc9kgx2Vw4f7DbjwGaj7qV4yZsJ5FBPuBsCSQNjl1ITYt2K 2673Cw2hmT8865O5EtlYOGbxPT2mYNB60a7fJHQ66e2sGKYLX6rj8L8/dvbjN44mPpw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795546262; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=BB4dvpr20SC5e/Tv9sGOQ+I4hmkO5OM8JeoWCYxHvq4=; b=QMf2Z6WeeIwOITFb04eqtaoMP9akBuDm2kb0LjtkN3Z0P3Jh3Dw74tiatAmYQu6RtT77 5VzNuyomqoek1z+BSG8PAxl4rDrs1UlHfdszldp1ep4HjVq6WKH/EH8HYuQuP2ji6duvU KywRwXZESVJYHARtd4zlwEWkAnOVzJEdosNjJi0qdvV0JcRHloDLBTOXM9JyHfaH3qX1j mxlUxLgT/4A2LtLzXZKRHPqJPv/hDc5SFbe1RS3sKe3eCO2bVL4qQoCzIlMin00NioK79 +b5h6/6OcFMwbL5h0GzUhaXAzYiWBvC6FnTuzX3HPccooUHuIBH+K1dTCdERwuWeZKA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=ddPmOKDQ; arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB49E606A31E; Tue, 24 Nov 2026 18:51:01 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BB49E606A31E
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=BB4dvpr20SC5e/Tv9sGOQ+I4hmkO5OM8JeoWCYxHvq4=; b=ddPmOKDQV22XD0M6C23IL+CB1f +JA+iNr/RylCv39jhqyB6O04Xk459XyUrGmsVeylTKN7zcKoT8UJWDtnPfC+O5JRCJlcgD3nHQ34O 88QAtZm1AHXtUt0JJsmbf+0ESdJISO+1iN0tH03TQPKP4m5KaQiNCkAb+AcfDx+RHBik=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xVvbH-00189o-VW; Tue, 24 Nov 2026 19:50:43 +0100
X-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
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <179550875790.4156.14185923394520188230@mail.zgclab.edu.cn>