Re: [PATCH net-next V2 1/5] net: lan743x: Add SFP support check flag

From: Raju Lakkaraju
Date: Thu Sep 12 2024 - 02:33:57 EST


Hi Andrew,

Thank you for review the patches.

The 09/11/2024 19:06, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> > + if (adapter->is_pci11x1x && !adapter->is_sgmii_en &&
> > + adapter->is_sfp_support_en) {
> > + netif_err(adapter, drv, adapter->netdev,
> > + "Invalid eeprom cfg: sfp enabled with sgmii disabled");
> > + return -EINVAL;
>
> is_sgmii_en actually means PCS? An SFP might need 1000BaseX or SGMII,

No, not really.
The PCI11010/PCI1414 chip can support either an RGMII interface or
an SGMII/1000Base-X/2500Base-X interface.

To differentiate between these interfaces, we need to enable or disable
the SGMII/1000Base-X/2500Base-X interface in the EEPROM.
This configuration is reflected in the STRAP_READ register (0x0C),
specifically bit 6.

According to the datasheet,
the "Strap Register (STRAP)" bit 6 is described as "SGMII_EN_STRAP"
Therefore, the flag is named "is_sgmii_en".

> phylink will tell you the mode to put the PCS into.

Yes. You are correct.
Based on PCS information, it will swich between SGMII or 1000Base-X or
2500Base-X I/F.

>
> Andrew

--
Thanks,
Raju