linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Daniel Golle <daniel@makrotopia.org>
Cc: Hauke Mehrtens <hauke@hauke-m.de>,
	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>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Russell King <linux@armlinux.org.uk>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Andreas Schirm <andreas.schirm@siemens.com>,
	Lukas Stockmann <lukas.stockmann@siemens.com>,
	Alexander Sverdlin <alexander.sverdlin@siemens.com>,
	Peter Christen <peter.christen@siemens.com>,
	Avinash Jayaraman <ajayaraman@maxlinear.com>,
	Bing tao Xu <bxu@maxlinear.com>, Liang Xu <lxu@maxlinear.com>,
	Juraj Povazanec <jpovazanec@maxlinear.com>,
	"Fanni (Fang-Yi) Chan" <fchan@maxlinear.com>,
	"Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>,
	"Livia M. Rosu" <lrosu@maxlinear.com>,
	John Crispin <john@phrozen.org>
Subject: Re: [PATCH net-next v4 7/7] net: dsa: lantiq_gswip: store switch API version in priv
Date: Sun, 24 Aug 2025 18:00:21 +0200	[thread overview]
Message-ID: <6c05a103-5e7c-4ad7-a648-4b7d573ca09b@lunn.ch> (raw)
In-Reply-To: <eddb51ae8d0b2046ca91906e93daad7be5af56d7.1755878232.git.daniel@makrotopia.org>

On Fri, Aug 22, 2025 at 05:12:21PM +0100, Daniel Golle wrote:
> Store the switch API version in struct gswip_priv. As the hardware has
> the 'major/minor' version bytes in the wrong order preventing numerical
> comparisons the version to be stored in gswip_priv is constructed in
> such a way that the REV field is the most significant byte and the MOD
> field the least significant byte. Also provide a conveniance macro to
> allow comparing the stored version of the hardware against the already
> defined GSWIP_VERSION_* macros.
>
> This is done in order to prepare supporting newer features such as 4096
> VLANs and per-port configurable learning which are only available
> starting from specific hardware versions.

Thanks for the updated commit message and comments. This is much
clearer and the code avoids all the issues around endianness.

> Signed-off-by: Daniel Golle <daniel@makrotopia.org>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2025-08-24 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 16:11 [PATCH net-next v4 0/7] net: dsa: lantiq_gswip: prepare for supporting new features Daniel Golle
2025-08-22 16:11 ` [PATCH net-next v4 1/7] net: dsa: lantiq_gswip: deduplicate dsa_switch_ops Daniel Golle
2025-08-22 16:11 ` [PATCH net-next v4 2/7] net: dsa: lantiq_gswip: prepare for more CPU port options Daniel Golle
2025-08-22 16:11 ` [PATCH net-next v4 3/7] net: dsa: lantiq_gswip: move definitions to header Daniel Golle
2025-08-22 16:11 ` [PATCH net-next v4 4/7] net: dsa: lantiq_gswip: introduce bitmap for MII ports Daniel Golle
2025-08-22 16:12 ` [PATCH net-next v4 5/7] net: dsa: lantiq_gswip: load model-specific microcode Daniel Golle
2025-08-22 16:12 ` [PATCH net-next v4 6/7] net: dsa: lantiq_gswip: make DSA tag protocol model-specific Daniel Golle
2025-08-22 16:12 ` [PATCH net-next v4 7/7] net: dsa: lantiq_gswip: store switch API version in priv Daniel Golle
2025-08-24 16:00   ` Andrew Lunn [this message]
2025-08-25 22:30 ` [PATCH net-next v4 0/7] net: dsa: lantiq_gswip: prepare for supporting new features 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=6c05a103-5e7c-4ad7-a648-4b7d573ca09b@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ajayaraman@maxlinear.com \
    --cc=alexander.sverdlin@siemens.com \
    --cc=andreas.schirm@siemens.com \
    --cc=bxu@maxlinear.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fchan@maxlinear.com \
    --cc=hauke@hauke-m.de \
    --cc=john@phrozen.org \
    --cc=jpovazanec@maxlinear.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lrosu@maxlinear.com \
    --cc=lukas.stockmann@siemens.com \
    --cc=lxu@maxlinear.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=peter.christen@siemens.com \
    --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;
as well as URLs for NNTP newsgroup(s).