netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Ido Schimmel <idosch@nvidia.com>
Cc: mkubecek@suse.cz, danieller@nvidia.com, netdev@vger.kernel.org,
	vladyslavt@nvidia.com, linux@armlinux.org.uk, andrew@lunn.ch
Subject: Re: [PATCH ethtool-next] sff-8636: report LOL / LOS / Tx Fault
Date: Mon, 12 Jun 2023 08:48:37 -0700	[thread overview]
Message-ID: <20230612084837.6c5b5ca9@kernel.org> (raw)
In-Reply-To: <ZIV6L+pIUvZ1tip4@shredder>

On Sun, 11 Jun 2023 10:39:27 +0300 Ido Schimmel wrote:
> > I was asked if "Linux reports" this information.
> > I'm not very confident on the merits, I'm going by the spec.
> > If it makes sense I'll send a similar patch for CMIS.  
> 
> I have two AOC connected to each other. When both are up:
> 
> # ethtool -m swp13 | grep "Rx loss of signal" -A 4
>         Rx loss of signal                         : None
>         Tx loss of signal                         : None
>         Rx loss of lock                           : None
>         Tx loss of lock                           : None
>         Tx adaptive eq fault                      : None
> 
> When I bring the other side down:
> 
> # ip link set dev swp14 down
> # ethtool -m swp13 | grep "Rx loss of signal" -A 4
>         Rx loss of signal                         : [ Yes, Yes, Yes, Yes ]
>         Tx loss of signal                         : None
>         Rx loss of lock                           : [ Yes, Yes, Yes, Yes ]
>         Tx loss of lock                           : None
>         Tx adaptive eq fault                      : None
> 
> When I bring the interface itself down:
> 
> # ip link set dev swp13 down
> # ethtool -m swp13 | grep "Rx loss of signal" -A 4
>         Rx loss of signal                         : [ Yes, Yes, Yes, Yes ]
>         Tx loss of signal                         : [ Yes, Yes, Yes, Yes ]
>         Rx loss of lock                           : [ Yes, Yes, Yes, Yes ]
>         Tx loss of lock                           : [ Yes, Yes, Yes, Yes ]
>         Tx adaptive eq fault                      : [ Yes, Yes, Yes, Yes ]
> 
> And I don't see these fields on PC:
> 
> # ethtool -m swp3 | grep "Rx loss of signal" -A 4

IOW works as expected, am I interpreting this correctly?

> > diff --git a/qsfp.h b/qsfp.h
> > index aabf09fdc623..b4a0ffe06da1 100644
> > --- a/qsfp.h
> > +++ b/qsfp.h
> > @@ -55,6 +55,8 @@
> >  #define	 SFF8636_TX2_FAULT_AW	(1 << 1)
> >  #define	 SFF8636_TX1_FAULT_AW	(1 << 0)
> >  
> > +#define	SFF8636_LOL_AW_OFFSET	0x05
> > +
> >  /* Module Monitor Interrupt Flags - 6-8 */
> >  #define	SFF8636_TEMP_AW_OFFSET	0x06
> >  #define	 SFF8636_TEMP_HALARM_STATUS		(1 << 7)
> > @@ -525,9 +527,15 @@
> >  /*  56h-5Fh reserved */
> >  
> >  #define	 SFF8636_OPTION_2_OFFSET	0xC1
> > +/* Tx input equalizers auto-adaptive */
> > +#define	  SFF8636_O2_TX_EQ_AUTO		(1 << 3)
> >  /* Rx output amplitude */
> >  #define	  SFF8636_O2_RX_OUTPUT_AMP	(1 << 0)
> >  #define	 SFF8636_OPTION_3_OFFSET	0xC2
> > +/* Rx CDR Loss of Lock */
> > +#define	  SFF8636_O3_RX_LOL		(1 << 5)
> > +/* Tx CDR Loss of Lock */
> > +#define	  SFF8636_O3_TX_LOL		(1 << 4)  
> 
> I'm looking at revision 2.10a and bit 4 is Rx while bit 5 is Tx.

Ugh, you're right, thanks.

  reply	other threads:[~2023-06-12 15:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09  0:44 [PATCH ethtool-next] sff-8636: report LOL / LOS / Tx Fault Jakub Kicinski
2023-06-09 15:31 ` Andrew Lunn
2023-06-09 16:18   ` Russell King (Oracle)
2023-06-09 16:36     ` Jakub Kicinski
2023-06-11  7:39 ` Ido Schimmel
2023-06-12 15:48   ` Jakub Kicinski [this message]
2023-06-12 18:37     ` Ido Schimmel

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=20230612084837.6c5b5ca9@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=danieller@nvidia.com \
    --cc=idosch@nvidia.com \
    --cc=linux@armlinux.org.uk \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=vladyslavt@nvidia.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).