From: Jakub Kicinski <kuba@kernel.org>
To: Thangaraj Samynathan <thangaraj.s@microchip.com>
Cc: <bryan.whitehead@microchip.com>, <UNGLinuxDriver@microchip.com>,
<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: lan743x: fix SGMII detection on PCI1xxxx B0+ during warm reset
Date: Mon, 9 Mar 2026 18:46:11 -0700 [thread overview]
Message-ID: <20260309184611.4a98d42b@kernel.org> (raw)
In-Reply-To: <20260305090355.4946-1-thangaraj.s@microchip.com>
On Thu, 5 Mar 2026 14:33:55 +0530 Thangaraj Samynathan wrote:
> --- a/drivers/net/ethernet/microchip/lan743x_main.c
> +++ b/drivers/net/ethernet/microchip/lan743x_main.c
> @@ -32,10 +32,12 @@ static void pci11x1x_strap_get_status(struct lan743x_adapter *adapter)
> {
> u32 chip_rev;
> u32 cfg_load;
> + u32 dev_rev;
> u32 hw_cfg;
> u32 strap;
> int ret;
>
> + dev_rev = adapter->csr.id_rev & ID_REV_CHIP_REV_MASK_;
> /* Timeout = 100 (i.e. 1 sec (10 msce * 100)) */
> ret = lan743x_hs_syslock_acquire(adapter, 100);
> if (ret < 0) {
> @@ -47,10 +49,11 @@ static void pci11x1x_strap_get_status(struct lan743x_adapter *adapter)
> cfg_load = lan743x_csr_read(adapter, ETH_SYS_CONFIG_LOAD_STARTED_REG);
> lan743x_hs_syslock_release(adapter);
> hw_cfg = lan743x_csr_read(adapter, HW_CFG);
> -
> - if (cfg_load & GEN_SYS_LOAD_STARTED_REG_ETH_ ||
> - hw_cfg & HW_CFG_RST_PROTECT_) {
> - strap = lan743x_csr_read(adapter, STRAP_READ);
> + strap = lan743x_csr_read(adapter, STRAP_READ);
> + if ((dev_rev == ID_REV_CHIP_REV_PCI11X1X_A0_ &&
it may be a good idea to a add a little helper like:
static bool pci11x1x_is_a0(const struct lan743x_adapter *adapter)
{
u32 dev_rev = adapter->csr.id_rev & ID_REV_CHIP_REV_MASK_;
return dev_rev == ID_REV_CHIP_REV_PCI11X1X_A0_;
}
and same thing for b0?
> + (cfg_load & GEN_SYS_LOAD_STARTED_REG_ETH_ ||
> + hw_cfg & HW_CFG_RST_PROTECT_)) ||
> + (strap & STRAP_READ_USE_SGMII_EN_)) {
I don't think this implements the logic you describe in the commit
message? You say:
For PCI11x1x B0 and later: Use the newly available
STRAP_READ_USE_SGMII_EN_
but your condition will also look at the strap & STRAP_READ_USE_SGMII_EN_
if cfg_load & GEN_SYS_LOAD_STARTED_REG_ETH_ || hw_cfg & HW_CFG_RST_PROTECT_
is also on A0
--
pw-bot: cr
next prev parent reply other threads:[~2026-03-10 1:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 9:03 [PATCH net-next] net: lan743x: fix SGMII detection on PCI1xxxx B0+ during warm reset Thangaraj Samynathan
2026-03-10 1:46 ` Jakub Kicinski [this message]
2026-03-10 3:45 ` Thangaraj.S
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=20260309184611.4a98d42b@kernel.org \
--to=kuba@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=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 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.