All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
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: Sun, 11 Jun 2023 10:39:27 +0300	[thread overview]
Message-ID: <ZIV6L+pIUvZ1tip4@shredder> (raw)
In-Reply-To: <20230609004400.1276734-1-kuba@kernel.org>

On Thu, Jun 08, 2023 at 05:44:00PM -0700, Jakub Kicinski wrote:
> Report whether Loss of Lock, of Signal and Tx Faults were detected.
> Print "None" in case no lane has the problem, and per-lane "Yes" /
> "No"  if at least one of the lanes reports true.
      ^ double space

> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> 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

See one comment below.

[...]

> 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.

  parent reply	other threads:[~2023-06-11  7:39 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 [this message]
2023-06-12 15:48   ` Jakub Kicinski
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=ZIV6L+pIUvZ1tip4@shredder \
    --to=idosch@nvidia.com \
    --cc=andrew@lunn.ch \
    --cc=danieller@nvidia.com \
    --cc=kuba@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.