From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A0ED416132A; Tue, 9 Dec 2025 01:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765243739; cv=none; b=fax7zEPCWRRbEwkvqDMdafXlxWpX9rQC+Dk7KeWEVMtOJJVX6wGkTL0VGsrzHMSWHxnRyYx4OsiOQ27gNYPzHa1q0Et4hXqXH+gHTl583XDSoKN9/0wOf9qeGTHuWQ3eJ2pmb/+2905fJUhvbA2KYbXWvZRNI6WZDBeRmdxO+Ko= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765243739; c=relaxed/simple; bh=JrWuVqm8rMEyruWFvkdUXinjXbAbaKJCeQdFj8VUF/g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aFpUuOFna1+g7mMbrMVYtNY1MLgmCgkN1vyUYbiAjW1MVB7l1EKGHpZMqMzw7EbWULznoSpRwXk1iqtDdQDSypLDCeBqDWH8+30iJTuEqecdaA1k1tnZH1F02e9zNpMtFfGIuxxQbGGUbxnMLbgoQYCxAPCucQWR+tAqAT7omqY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.99) (envelope-from ) id 1vSmX6-000000005Ak-26FH; Tue, 09 Dec 2025 01:28:52 +0000 Date: Tue, 9 Dec 2025 01:28:49 +0000 From: Daniel Golle To: Hauke Mehrtens , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Daniel Golle , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Rasmus Villemoes , "Benny (Ying-Tsan) Weng" , John Crispin Subject: [PATCH net v4 2/4] net: dsa: mxl-gsw1xx: fix order in .remove operation Message-ID: <63f882eeb910cf24503c35a443b541cc54a930f2.1765241054.git.daniel@makrotopia.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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)" Signed-off-by: Daniel Golle --- 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