public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Sergio Palumbo <palumbo.ser@outlook.it>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: sfp: add quirk for OEM DFP-34X-2C2 GPON ONU SFP
Date: Fri, 2 Feb 2024 18:01:31 +0000	[thread overview]
Message-ID: <Zb0t+zKHx+0wTXH5@shell.armlinux.org.uk> (raw)
In-Reply-To: <AS1PR03MB8189B99C360FB403B8A0DD6882422@AS1PR03MB8189.eurprd03.prod.outlook.com>

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!

  reply	other threads:[~2024-02-02 18:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28 14:06 [PATCH net-next] net: sfp: add quirk for OEM DFP-34X-2C2 GPON ONU SFP Sergio Palumbo
2024-01-28 14:42 ` Russell King (Oracle)
2024-02-02 17:41   ` Sergio Palumbo
2024-02-02 18:01     ` Russell King (Oracle) [this message]
2024-02-02 23:18       ` Sergio Palumbo
2024-02-02 23:45         ` Russell King (Oracle)
2024-02-03  9:16           ` Sergio Palumbo
     [not found]           ` <f8cf41f2-4a90-4ef5-b214-906319bd82d4@outlook.it>
2024-02-05 18:55             ` Sergio Palumbo
2024-02-06 14:15               ` Russell King (Oracle)
2024-02-08  8:30                 ` Sergio Palumbo
2024-02-08  9:07                   ` Russell King (Oracle)
2024-02-08 14:00                     ` Sergio Palumbo
2024-02-08 15:28                       ` Russell King (Oracle)
2024-02-08 16:19                         ` Sergio Palumbo
2024-02-08 16:28                           ` Russell King (Oracle)
2024-02-08 17:21                             ` Sergio Palumbo
2024-02-17 10:13                             ` Sergio Palumbo
2024-02-17 10:28                               ` Russell King (Oracle)
2024-02-17 11:28                                 ` Sergio Palumbo

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=Zb0t+zKHx+0wTXH5@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=palumbo.ser@outlook.it \
    /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