From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Chris Morgan <macromorgan@hotmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Chris Morgan <macroalpha82@gmail.com>,
netdev@vger.kernel.org, hkallweit1@gmail.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Subject: Re: [PATCH V2] net: sfp: add quirk for Potron SFP+ XGSPON ONU Stick
Date: Wed, 11 Jun 2025 09:31:09 +0100 [thread overview]
Message-ID: <aEk-zY0gfGx-PPa6@shell.armlinux.org.uk> (raw)
In-Reply-To: <SN6PR1901MB4654B995FBAFAC7298C7C6A3A575A@SN6PR1901MB4654.namprd19.prod.outlook.com>
On Tue, Jun 10, 2025 at 10:43:31PM -0500, Chris Morgan wrote:
> On Fri, Jun 06, 2025 at 11:47:00PM +0100, Russell King (Oracle) wrote:
> > On Fri, Jun 06, 2025 at 05:32:43PM -0500, Chris Morgan wrote:
> > > On Fri, Jun 06, 2025 at 10:21:37PM +0100, Russell King (Oracle) wrote:
> > > > On Fri, Jun 06, 2025 at 01:54:27PM -0500, Chris Morgan wrote:
> > > > > Option values : 0x00 0x00
> > > >
> > > > This suggests that LOS is not supported, nor any of the other hardware
> > > > signals. However, because early revisions of the SFP MSA didn't have
> > > > an option byte, and thus was zero, but did have the hardware signals,
> > > > we can't simply take this to mean the signals aren't implemented,
> > > > except for RX_LOS.
> > > >
> > > > > I'll send the bin dump in another message (privately). Since the OUI
> > > > > is 00:00:00 and the serial number appears to be a datestamp, I'm not
> > > > > seeing anything on here that's sensitive.
> > > >
> > > > I have augmented tools which can parse the binary dump, so I get a
> > > > bit more decode:
> > > >
> > > > Enhanced Options : soft TX_DISABLE
> > > > Enhanced Options : soft TX_FAULT
> > > > Enhanced Options : soft RX_LOS
> > > >
> > > > So, this tells sfp.c that the status bits in the diagnostics address
> > > > offset 110 (SFP_STATUS) are supported.
> > > >
> > > > Digging into your binary dump, SFP_STATUS has the value 0x02, which
> > > > indicates RX_LOS is set (signal lost), but TX_FAULT is clear (no
> > > > transmit fault.)
> > > >
> > > > I'm guessing the SFP didn't have link at the time you took this
> > > > dump given that SFP_STATUS indicates RX_LOS was set?
> > > >
> > >
> > > That is correct.
> >
> > Are you able to confirm that SFP_STATUS RX_LOS clears when the
> > module has link?
>
> I believe this is the case. I've sent you a dump of my EEPROM when the
> SFP+ is active (it's now powering my internet connection at home) in a
> private message to confirm.
Yes, I can confirm this. The RX_LOS bit on SFP_STATUS appears to work
correctly, so all we need to do is ignore the hardware signal(s).
> > I'd prefer to have an additional couple of functions:
> >
> > sfp_fixup_ignore_hw_tx_fault()
> > sfp_fixup_ignore_hw_los()
> >
> > or possibly:
> >
> > sfp_fixup_ignore_hw(struct sfp *sfp, unsigned int mask)
> >
>
> Which of these would you prefer? Do you want a function for each
> scenario or just a generic sfp_fixup_ignore_hw_fault_signal()? I can
> create functions for each and then apply them to my device (and
> probably update the sfp_fixup_halny_gsfp() too since it's identical to
> what I'm trying to do plus the delay bits).
I think the latter as it's more flexible and less code.
Yes, please update sfp_fixup_halny_gsfp() as well.
Thanks.
--
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:[~2025-06-11 8:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 2:22 [PATCH V2] net: sfp: add quirk for Potron SFP+ XGSPON ONU Stick Chris Morgan
2025-06-06 12:53 ` Andrew Lunn
2025-06-06 14:44 ` Chris Morgan
2025-06-06 15:33 ` Andrew Lunn
2025-06-06 18:54 ` Chris Morgan
2025-06-06 21:21 ` Russell King (Oracle)
2025-06-06 22:32 ` Chris Morgan
2025-06-06 22:47 ` Russell King (Oracle)
2025-06-11 3:43 ` Chris Morgan
2025-06-11 8:31 ` Russell King (Oracle) [this message]
2025-06-06 16:51 ` Russell King (Oracle)
2025-06-06 16:47 ` Russell King (Oracle)
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=aEk-zY0gfGx-PPa6@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=macroalpha82@gmail.com \
--cc=macromorgan@hotmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).