All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Chen-Yu Tsai <wens@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-sunxi@lists.linux.dev, netdev@vger.kernel.org,
	Paolo Abeni <pabeni@redhat.com>,
	Samuel Holland <samuel@sholland.org>
Subject: [PATCH RFC net-next 01/10] net: stmmac: rename min_id to min_snpsver
Date: Wed, 08 Apr 2026 10:26:44 +0100	[thread overview]
Message-ID: <E1wAPBM-0000000F7jo-1DIY@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <adYfPBHsXxQUsMyr@shell.armlinux.org.uk>

min_id is the minimum Synopsys IP version that the hwif entry will
match. Name it min_snpsver so that it's clear which part of the
version ID it is related to.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/ethernet/stmicro/stmmac/hwif.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.c b/drivers/net/ethernet/stmicro/stmmac/hwif.c
index 511b0fd5e834..3774af66db48 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.c
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.c
@@ -110,7 +110,7 @@ int stmmac_reset(struct stmmac_priv *priv)
 
 static const struct stmmac_hwif_entry {
 	enum dwmac_core_type core_type;
-	u32 min_id;
+	u32 min_snpsver;
 	u32 dev_id;
 	const struct stmmac_regs_off regs;
 	const void *desc;
@@ -129,7 +129,7 @@ static const struct stmmac_hwif_entry {
 	/* NOTE: New HW versions shall go to the end of this table */
 	{
 		.core_type = DWMAC_CORE_MAC100,
-		.min_id = 0,
+		.min_snpsver = 0,
 		.regs = {
 			.ptp_off = PTP_GMAC3_X_OFFSET,
 			.mmc_off = MMC_GMAC3_X_OFFSET,
@@ -146,7 +146,7 @@ static const struct stmmac_hwif_entry {
 		.quirks = stmmac_dwmac1_quirks,
 	}, {
 		.core_type = DWMAC_CORE_GMAC,
-		.min_id = 0,
+		.min_snpsver = 0,
 		.regs = {
 			.ptp_off = PTP_GMAC3_X_OFFSET,
 			.mmc_off = MMC_GMAC3_X_OFFSET,
@@ -163,7 +163,7 @@ static const struct stmmac_hwif_entry {
 		.quirks = stmmac_dwmac1_quirks,
 	}, {
 		.core_type = DWMAC_CORE_GMAC4,
-		.min_id = 0,
+		.min_snpsver = 0,
 		.regs = {
 			.ptp_off = PTP_GMAC4_OFFSET,
 			.mmc_off = MMC_GMAC4_OFFSET,
@@ -183,7 +183,7 @@ static const struct stmmac_hwif_entry {
 		.quirks = stmmac_dwmac4_quirks,
 	}, {
 		.core_type = DWMAC_CORE_GMAC4,
-		.min_id = DWMAC_CORE_4_00,
+		.min_snpsver = DWMAC_CORE_4_00,
 		.regs = {
 			.ptp_off = PTP_GMAC4_OFFSET,
 			.mmc_off = MMC_GMAC4_OFFSET,
@@ -204,7 +204,7 @@ static const struct stmmac_hwif_entry {
 		.quirks = NULL,
 	}, {
 		.core_type = DWMAC_CORE_GMAC4,
-		.min_id = DWMAC_CORE_4_10,
+		.min_snpsver = DWMAC_CORE_4_10,
 		.regs = {
 			.ptp_off = PTP_GMAC4_OFFSET,
 			.mmc_off = MMC_GMAC4_OFFSET,
@@ -225,7 +225,7 @@ static const struct stmmac_hwif_entry {
 		.quirks = NULL,
 	}, {
 		.core_type = DWMAC_CORE_GMAC4,
-		.min_id = DWMAC_CORE_5_10,
+		.min_snpsver = DWMAC_CORE_5_10,
 		.regs = {
 			.ptp_off = PTP_GMAC4_OFFSET,
 			.mmc_off = MMC_GMAC4_OFFSET,
@@ -246,7 +246,7 @@ static const struct stmmac_hwif_entry {
 		.quirks = NULL,
 	}, {
 		.core_type = DWMAC_CORE_XGMAC,
-		.min_id = DWXGMAC_CORE_2_10,
+		.min_snpsver = DWXGMAC_CORE_2_10,
 		.dev_id = DWXGMAC_ID,
 		.regs = {
 			.ptp_off = PTP_XGMAC_OFFSET,
@@ -268,7 +268,7 @@ static const struct stmmac_hwif_entry {
 		.quirks = NULL,
 	}, {
 		.core_type = DWMAC_CORE_XGMAC,
-		.min_id = DWXLGMAC_CORE_2_00,
+		.min_snpsver = DWXLGMAC_CORE_2_00,
 		.dev_id = DWXLGMAC_ID,
 		.regs = {
 			.ptp_off = PTP_XGMAC_OFFSET,
@@ -302,7 +302,7 @@ stmmac_hwif_find(enum dwmac_core_type core_type, u8 snpsver, u8 dev_id)
 		if (core_type != entry->core_type)
 			continue;
 		/* Use synopsys_id var because some setups can override this */
-		if (snpsver < entry->min_id)
+		if (snpsver < entry->min_snpsver)
 			continue;
 		if (core_type == DWMAC_CORE_XGMAC &&
 		    dev_id != entry->dev_id)
-- 
2.47.3



  reply	other threads:[~2026-04-08  9:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08  9:26 [PATCH RFC net-next 00/10] net: stmmac: clean up / fix synopsys IP version checks Russell King (Oracle)
2026-04-08  9:26 ` Russell King (Oracle) [this message]
2026-04-08  9:26 ` [PATCH RFC net-next 02/10] net: stmmac: rename dev_id to userver Russell King (Oracle)
2026-04-09 23:07   ` Jitendra Vegiraju
2026-04-10  8:39     ` Russell King (Oracle)
2026-04-10 21:04       ` Jitendra Vegiraju
2026-04-10 21:04         ` Jitendra Vegiraju
2026-04-08  9:26 ` [PATCH RFC net-next 03/10] net: stmmac: always fill in ver->userver Russell King (Oracle)
2026-04-08  9:26 ` [PATCH RFC net-next 04/10] net: stmmac: use ver->userver and ver->snpsver to print version Russell King (Oracle)
2026-04-08  9:27 ` [PATCH RFC net-next 05/10] net: stmmac: rename confusing synopsys_id Russell King (Oracle)
2026-04-08  9:27 ` [PATCH RFC net-next 06/10] net: stmmac: dche is only for GMAC4 cores Russell King (Oracle)
2026-04-08  9:27 ` [PATCH RFC net-next 07/10] net: stmmac: limit MAC .debug() to dwmac1000 and dwmac4 Russell King (Oracle)
2026-04-08  9:27 ` [PATCH RFC net-next 08/10] net: stmmac: simplify stmmac_get_ethtool_stats() Russell King (Oracle)
2026-04-08  9:27 ` [PATCH RFC net-next 09/10] net: stmmac: clean up test for rx_coe debug printing Russell King (Oracle)
2026-04-08  9:27 ` [PATCH RFC net-next 10/10] net: stmmac: only print receive COE type for GMAC cores Russell King (Oracle)

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=E1wAPBM-0000000F7jo-1DIY@rmk-PC.armlinux.org.uk \
    --to=rmk+kernel@armlinux.org.uk \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jitendra.vegiraju@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=samuel@sholland.org \
    --cc=wens@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.