Re: [PATCH v4 2/5] net: lan743x: read SFP straps from PCI11x1x device
From: Andrew Lunn
Date: Thu May 14 2026 - 08:48:11 EST
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