Re: [PATCH net-next] net: sfp: add quirk for OEM DFP-34X-2C2 GPON ONU SFP

Russell King (Oracle)
2024-02-02T18:01:39Z

On Fri, Feb 02, 2024 at 06:41:51PM +0100, Sergio Palumbo wrote:
> Dear Russell,
> sorry for the indenting. I will no longer use indenting in future postings.
> As explained in the description setting up the module via telnet with
> LAN_SDS_MODE=6 puts the module in 2500X autonegotiating mode.

Okay, so this requires manual configuration to switch the module into
2500base-X.

> Without applying the patch the module shows up to linux at 1000X
> because the EEPROM is not correctly reporting the 2500X speeds.

Okay, so in its default as-new state without reconfiguring the module,
it reports 1000base-X and Linux drives it as such. This sounds fine.

> Ethtool lines in the description repporting only 1000X and host
> connecting only at 1000X.

That would be expected.

> After the quirk as you can see from the ethtool lines I put in the
> description the module shows up to linux with both speeds 1000X and 2500X.

Yes, adding the quirk will have that effect, but it will also have the
effect that we will choose 2500base-X for host interfaces that support
it, whether or not the module has been reconfigured to operate at
2500base-X. This will result in a mismatch between the module and the
host, and the link will not come up.

> According to the above if the host has the ability to connect at 2500X
> the module is connecting at 2500X, if the host has the ability to connect
> at 1000X only it will connect at 1000X.

The current situation:

Host supports Module Mode Functional
1000base-X default 1000base-X Yes
1000base-X LAN_SDS_MODE=6 1000base-X No
1000base-X + 2500base-X default 1000base-X Yes ***
1000base-X + 2500base-X LAN_SDS_MODE=6 1000base-X No

With the quirk:
Host supports Module Mode Functional
1000base-X default 1000base-X Yes
1000base-X LAN_SDS_MODE=6 1000base-X No
1000base-X + 2500base-X default 2500base-X No ***
1000base-X + 2500base-X LAN_SDS_MODE=6 2500base-X Yes

The lines marked "***" are what I'm concerned about - by adding this
quirk, it has the effect of trading one working configuration (the
one where the module is in its default factory configuration) for one
which requires special configuration of the module _and_ which breaks
the factory configuration.

On the plus side, ethtool _can_ be used to switch the interface mode
back to 1000base-X, but given that this was working it seems backwards
to need manual intervention.

> On the other side after the quirk and the module set to LAN_SDS_MODE=1
> 1000X mode. Linux host is connecting at 1000X only.

No it won't. The module will still be detected, the quirk will be used,
which will indicate to the kernel that the module supports both
1000base-X and 2500base-X. With a host interface that supports both,
the kernel will choose 2500base-X, but the module will be using
1000base-X - and the link will not come up.

At the very least, this needs to be mentioned in the commit message,
so that the implications of this can be properly considered.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!