From: Daniel Golle <daniel@makrotopia.org>
To: Hauke Mehrtens <hauke@hauke-m.de>, Andrew Lunn <andrew@lunn.ch>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
Daniel Golle <daniel@makrotopia.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Rasmus Villemoes <ravi@prevas.dk>,
"Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>,
John Crispin <john@phrozen.org>
Subject: [PATCH net v4 2/4] net: dsa: mxl-gsw1xx: fix order in .remove operation
Date: Tue, 9 Dec 2025 01:28:49 +0000 [thread overview]
Message-ID: <63f882eeb910cf24503c35a443b541cc54a930f2.1765241054.git.daniel@makrotopia.org> (raw)
In-Reply-To: <cover.1765241054.git.daniel@makrotopia.org>
The driver's .remove operation was calling gswip_disable_switch() which
clears the GSWIP_MDIO_GLOB_ENABLE bit before calling
dsa_unregister_switch() and thereby violating a Golden Rule of driver
development to always unpublish userspace interfaces before disabling
hardware, as pointed out by Russell King.
Fix this by relying in GSWIP_MDIO_GLOB_ENABLE being cleared by the
.teardown operation introduced by the previous commit
("net: dsa: lantiq_gswip: fix teardown order").
Fixes: 22335939ec907 ("net: dsa: add driver for MaxLinear GSW1xx switch family")
Suggested-by: "Russell King (Oracle)" <linux@armlinux.org.uk>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
v4: initial submission, not present in previous versions
drivers/net/dsa/lantiq/mxl-gsw1xx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/dsa/lantiq/mxl-gsw1xx.c b/drivers/net/dsa/lantiq/mxl-gsw1xx.c
index cf33a16fd183b..cda966d71e889 100644
--- a/drivers/net/dsa/lantiq/mxl-gsw1xx.c
+++ b/drivers/net/dsa/lantiq/mxl-gsw1xx.c
@@ -652,8 +652,6 @@ static void gsw1xx_remove(struct mdio_device *mdiodev)
if (!priv)
return;
- gswip_disable_switch(priv);
-
dsa_unregister_switch(priv->ds);
}
--
2.52.0
next prev parent reply other threads:[~2025-12-09 1:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 1:27 [PATCH net v4 0/4] net: dsa: lantiq: a bunch of fixes Daniel Golle
2025-12-09 1:28 ` [PATCH net v4 1/4] net: dsa: lantiq_gswip: fix order in .remove operation Daniel Golle
2025-12-09 1:28 ` Daniel Golle [this message]
2025-12-09 1:29 ` [PATCH net v4 3/4] net: dsa: mxl-gsw1xx: fix .shutdown driver operation Daniel Golle
2025-12-09 1:29 ` [PATCH net v4 4/4] net: dsa: mxl-gsw1xx: manually clear RANEG bit Daniel Golle
2025-12-10 15:52 ` Vladimir Oltean
2025-12-10 16:03 ` Daniel Golle
2025-12-10 16:16 ` [PATCH net v4 0/4] net: dsa: lantiq: a bunch of fixes Vladimir Oltean
2025-12-16 18:08 ` Daniel Golle
2025-12-16 18:13 ` Vladimir Oltean
2025-12-18 12:00 ` patchwork-bot+netdevbpf
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=63f882eeb910cf24503c35a443b541cc54a930f2.1765241054.git.daniel@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hauke@hauke-m.de \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=ravi@prevas.dk \
--cc=yweng@maxlinear.com \
/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®