From nobody Sat Oct 4 06:29:38 2025 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 CDA062777F2; Wed, 20 Aug 2025 01:55: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=1755654959; cv=none; b=DrFDCzpEVK0wfy1guKpv6UpsaZVGNuS9aoKMRD7BuqZN5P7takRDPmtJiyEo3s7etyPgQ0+9BJAaZBUYxNS7+YOdiFWQEQ4sOlCEz0yDmFD9kOQTx/kGmjDtah2Dfnvi6tUnk/00DTWxri0fFTnpu9wRvZ42xRjBKAf3ByhMMoA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755654959; c=relaxed/simple; bh=glFPegpKflaTMd3f1B6r40/dcLUpXl7JFQ4ydtzWQ9k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DgjccFFsjPyC7utB9HtNs48S/hY4OsI+O+3OjwLMvZlMG9z2nazQLIsP8HUNSYCsi2R6sje+5QBv8/KOhRUS2o5j+OyB+hCHL2A5bjT1palHP9k9NQTbqUNfTRmCRsCTlTGHfa2pFciPyJECscrMaMgQWsWl/+iyOZrlwKkSIx0= 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.98.2) (envelope-from ) id 1uoY3N-000000006EQ-0mK8; Wed, 20 Aug 2025 01:55:53 +0000 Date: Wed, 20 Aug 2025 02:55:49 +0100 From: Daniel Golle To: Hauke Mehrtens , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Philipp Zabel , Russell King , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Andreas Schirm , Lukas Stockmann , Alexander Sverdlin , Peter Christen , Avinash Jayaraman , Bing tao Xu , Liang Xu , Juraj Povazanec , "Fanni (Fang-Yi) Chan" , "Benny (Ying-Tsan) Weng" , "Livia M. Rosu" , John Crispin Subject: [PATCH net-next v3 7/8] net: dsa: lantiq_gswip: store switch API version in priv Message-ID: <88e9ca073e31cdd54ef093053731b32947e8bc67.1755654392.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-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Store the switch API version in struct gswip_priv (in host endian) to prepare supporting newer features such as 4096 VLANs and per-port configurable learning. Signed-off-by: Daniel Golle --- v3: use __force for version field endian exception (__le16 __force) to fix sparse warning. v2: no changes drivers/net/dsa/lantiq_gswip.c | 3 +++ drivers/net/dsa/lantiq_gswip.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c index f8a43c351649..8999c3f2d290 100644 --- a/drivers/net/dsa/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq_gswip.c @@ -28,6 +28,7 @@ #include "lantiq_gswip.h" #include "lantiq_pce.h" =20 +#include #include #include #include @@ -1936,6 +1937,8 @@ static int gswip_probe(struct platform_device *pdev) "gphy fw probe failed\n"); } =20 + priv->version =3D le16_to_cpu((__le16 __force)version); + /* bring up the mdio bus */ err =3D gswip_mdio(priv); if (err) { diff --git a/drivers/net/dsa/lantiq_gswip.h b/drivers/net/dsa/lantiq_gswip.h index 0b7b6db4eab9..077d1928149b 100644 --- a/drivers/net/dsa/lantiq_gswip.h +++ b/drivers/net/dsa/lantiq_gswip.h @@ -258,6 +258,7 @@ struct gswip_priv { struct gswip_gphy_fw *gphy_fw; u32 port_vlan_filter; struct mutex pce_table_lock; + u16 version; }; =20 #endif /* __LANTIQ_GSWIP_H */ --=20 2.50.1