From: Andrew Lunn <andrew@lunn.ch>
To: Thangaraj Samynathan <thangaraj.s@microchip.com>
Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, bryan.whitehead@microchip.com,
UNGLinuxDriver@microchip.com, linux@armlinux.org.uk,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/5] net: lan743x: read SFP straps from PCI11x1x device
Date: Thu, 14 May 2026 14:47:09 +0200 [thread overview]
Message-ID: <053eaadf-07f3-431f-a0a4-28980adb8213@lunn.ch> (raw)
In-Reply-To: <20260514105028.42942-3-thangaraj.s@microchip.com>
On Thu, May 14, 2026 at 04:20:25PM +0530, Thangaraj Samynathan wrote:
> Reads the SFP enable bits from the strap registers to determine
> if the hardware is configured for SFP usage.
What exactly does this strapping mean? Is there a definition in the
documentation?
> Introduce CONFIG_LAN743X_SFP to guard SFP-specific code
Why? Does this add a lot of code? Most MAC drivers don't have such a
Kconfig configuration, so i think this needs some justification.
> +#ifdef CONFIG_LAN743X_SFP
> + if (adapter->is_pci11x1x && !adapter->is_pcs_en &&
> + adapter->is_sfp_support_en) {
> + netif_err(adapter, drv, adapter->netdev,
> + "Invalid EEPROM configuration: SFP_EN strap specified without SGMII_EN strap\n");
> + adapter->is_sfp_support_en = false;
Shouldn't that be fatal? You have no way to drive the hardware, so is
there any point going further?
What also seems to be missing here is the case where the strapping is
set to indicate SFP, but CONFIG_LAN743X_SFP is not enabled. That
should also be a fatal error.
Andrew
next prev parent reply other threads:[~2026-05-14 12:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 10:50 [PATCH v4 0/5] net: lan743x: Add SFP support for PCI11x1x Thangaraj Samynathan
2026-05-14 10:50 ` [PATCH v4 1/5] net: lan743x: rename is_sgmii_en to is_pcs_en Thangaraj Samynathan
2026-05-14 12:38 ` Andrew Lunn
2026-05-14 10:50 ` [PATCH v4 2/5] net: lan743x: read SFP straps from PCI11x1x device Thangaraj Samynathan
2026-05-14 12:47 ` Andrew Lunn [this message]
2026-05-14 10:50 ` [PATCH v4 3/5] net: lan743x: Add support to software-nodes for SFP Thangaraj Samynathan
2026-05-14 12:57 ` Andrew Lunn
2026-05-14 13:02 ` Andrew Lunn
2026-05-14 10:50 ` [PATCH v4 4/5] net: lan743x: Register SFP platform device for PCI11x1x Thangaraj Samynathan
2026-05-14 10:50 ` [PATCH v4 5/5] net: lan743x: Add PCS/XPCS support for SFP on PCI11x1x Thangaraj Samynathan
2026-05-14 13:16 ` Andrew Lunn
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=053eaadf-07f3-431f-a0a4-28980adb8213@lunn.ch \
--to=andrew@lunn.ch \
--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=linux@armlinux.org.uk \
--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