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 23:45:43 +0000 [thread overview]
Message-ID: <Zb1+p6FiJwUF53xc@shell.armlinux.org.uk> (raw)
In-Reply-To: <AS1PR03MB8189D48114A559B080AF5BEA82422@AS1PR03MB8189.eurprd03.prod.outlook.com>
On Sat, Feb 03, 2024 at 12:18:13AM +0100, Sergio Palumbo wrote:
> Hello Russell,
> thanks for your explanation. I have to say that:
> Module default is LAN_SDS_MODE=1
> Host banana PI R3 supporting 1000base-X + 2500base-X
> I would update the table as follows:
>
> The current situation:
> Host supports Module Mode Functional
> 1000base-X LAN_SDS_MODE=1 1000base-X Not tested, but expect to work as 1000base-X + 2500base-X
> 1000base-X LAN_SDS_MODE=6 1000base-X Not tested, but expect to work as 1000base-X + 2500base-X
> 1000base-X + 2500base-X LAN_SDS_MODE=1 1000base-X Yes
> 1000base-X + 2500base-X LAN_SDS_MODE=6 1000base-X Yes (host forcing module at 1000base-X)
>
> I suppose that Banana PI R3 host is forced by linux drivers
> at 1000base-X so first two cases should be same as second two cases.
>
>
> With the quirk:
> Host supports Module Mode Functional
> 1000base-X LAN_SDS_MODE=1 1000base-X Not tested, but expect to work as 1000base-X + 2500base-X host
> 1000base-X LAN_SDS_MODE=6 1000base-X Not tested, but expect to work as 1000base-X + 2500base-X host
> 1000base-X + 2500base-X LAN_SDS_MODE=1 1000base-X Yes (module forcing host at 1000base-X)
> 1000base-X + 2500base-X LAN_SDS_MODE=6 2500base-X Yes
Your third line is just wrong. Given the capabilities of the host
_and_ the capabilities of the module adjusted by your quirk, phylink
_will_ choose 2500base-X _not_ 1000base-X for that. With your quirk,
there is no way for Linux to know what LAN_SDS_MODE has been set
in the module. Even without your quirk, _unless_ the module updates
the EEPROM contents which is unlikely, there isn't a way to know.
Add #define DEBUG in phylink.c, rebuild and run that kernel. Try
that exact configuration. Report to me the kernel messages.
Adding a quirk that makes it not work in its default state is
technically a regression. We can't know whether people are already
using this module with Linux in this state. Adding this change
potentially breaks users setups.
> I suppose Banana PI R3 forcing Linux drivers at 1000-X when
> module in LAN_SDS_MODE=1 and expect it should work alpso with
> hosts at 1000base-X only in LAN_SDS_MODE=1 and LAN_SDS_MODE=6
There is no way for Linux to know what LAN_SDS_MODE the module is
in.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2024-02-02 23:45 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)
2024-02-02 23:18 ` Sergio Palumbo
2024-02-02 23:45 ` Russell King (Oracle) [this message]
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=Zb1+p6FiJwUF53xc@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;
as well as URLs for NNTP newsgroup(s).