From: Simon Horman <horms@kernel.org>
To: thangaraj.s@microchip.com
Cc: 'Simon Horman' <horms@kernel.org>,
netdev@vger.kernel.org, bryan.whitehead@microchip.com,
UNGLinuxDriver@microchip.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 1/2] net: lan743x: add RMII strap status detection for PCI11x1x
Date: Wed, 10 Jun 2026 17:25:08 +0100 [thread overview]
Message-ID: <20260610162507.466793-3-horms@kernel.org> (raw)
In-Reply-To: <20260608100435.11214-2-thangaraj.s@microchip.com>
From: 'Simon Horman' <horms@kernel.org>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
Full review at: https://netdev-ai.bots.linux.dev/sashiko/
---
Subject: net: lan743x: add RMII strap status detection for PCI11x1x
This patch extends pci11x1x_strap_get_status() to read RMII strap bits
from STRAP_READ and initialise a new is_rmii_en flag on the adapter,
updating the netif_dbg() to print the selected interface as SGMII, RMII
or RGMII.
> diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
> index 1cdce35e1423..0798f3f1f435 100644
> --- a/drivers/net/ethernet/microchip/lan743x_main.c
> +++ b/drivers/net/ethernet/microchip/lan743x_main.c
> @@ -73,8 +74,15 @@ static void pci11x1x_strap_get_status(struct lan743x_adapter *adapter)
> adapter->is_sgmii_en = false;
> }
> }
> - netif_dbg(adapter, drv, adapter->netdev,
> - "SGMII I/F %sable\n", adapter->is_sgmii_en ? "En" : "Dis");
> +
> + if (!adapter->is_sgmii_en && strap & STRAP_READ_USE_RMII_EN_) {
> + if (strap & STRAP_READ_RMII_EN_)
> + adapter->is_rmii_en = true;
> + }
> +
> + netif_dbg(adapter, drv, adapter->netdev, "Selected I/F: %s\n",
> + adapter->is_sgmii_en ? "SGMII" :
> + adapter->is_rmii_en ? "RMII" : "RGMII");
> }
[Low]
This isn't a bug, but does the new "Selected I/F: %s" debug print stay
consistent with the rest of the driver when is_rmii_en is true?
In lan743x_mdiobus_init() the non-SGMII branch still prints unconditionally:
} else {
dev_dbg(&adapter->pdev->dev, "RGMII operation\n");
// Only C22 support when RGMII I/F
adapter->mdiobus->read = lan743x_mdiobus_read_c22;
adapter->mdiobus->write = lan743x_mdiobus_write_c22;
adapter->mdiobus->name = "lan743x-mdiobus";
So an RMII-strapped board will report "Selected I/F: RMII" from
pci11x1x_strap_get_status() and then "RGMII operation" from
lan743x_mdiobus_init() in the same boot. The C22-only setup is correct
for both RGMII and RMII, so the only effect is the contradictory dmesg
line. Should this dev_dbg() also be updated to reflect the RMII case,
either in this patch or in the follow-up "net: lan743x: add support for
RMII interface"?
next prev parent reply other threads:[~2026-06-10 16:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 10:04 [PATCH net-next v3 0/2] net: lan743x: add RMII support for PCI11x1x Thangaraj Samynathan
2026-06-08 10:04 ` [PATCH net-next v3 1/2] net: lan743x: add RMII strap status detection " Thangaraj Samynathan
2026-06-10 16:25 ` Simon Horman [this message]
2026-06-08 10:04 ` [PATCH net-next v3 2/2] net: lan743x: add support for RMII interface Thangaraj Samynathan
2026-06-10 16:26 ` Simon Horman
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=20260610162507.466793-3-horms@kernel.org \
--to=horms@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=bryan.whitehead@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thangaraj.s@microchip.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