netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	David Jander <david@protonic.nl>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
	mkl@pengutronix.de, Marek Vasut <marex@denx.de>,
	Christian Herber <christian.herber@nxp.com>
Subject: Re: signal quality and cable diagnostic
Date: Mon, 11 May 2020 16:59:26 +0200	[thread overview]
Message-ID: <20200511145926.GC8503@lion.mk-sys.cz> (raw)
In-Reply-To: <20200511141310.GA2543@pengutronix.de>

On Mon, May 11, 2020 at 04:13:10PM +0200, Oleksij Rempel wrote:
> 
> I continue to work on TJA11xx PHY and need to export some additional
> cable diagnostic/link stability information: Signal Quality Index (SQI).
> The PHY data sheet describes it as following [1]:
> ================================================================================
>   6.10.3   Link stability
> 
> The signal-to-noise ratio is the parameter used to estimate link
> stability. The PMA Receive function monitors the signal-to-noise ratio
> continuously. Once the signal-to-noise ratio falls below a configurable
> threshold (SQI_FAILLIMIT), the link status is set to FAIL and
> communication is interrupted. The TJA1100 allows for adjusting the
> sensitivity of the PMA Receive function by configuring this threshold.
> The microcontroller can always check the current value of the
> signal-to-noise ratio via the SMI, allowing it to track a possible
> degradation in link stability.
> ================================================================================
> 
> Since this functionality is present at least on TJA11xx PHYs and
> mandatory according to Open Alliance[2], I hope this functionality is
> present on other 100/1000Base-T1 PHYs. So may be some common abstraction
> is possible. What would be the best place to provide it for the user
> space? According to the [2] SQI, is the part of Dynamic Channel Quality
> (DCQ) together with Mean Square Error (MSE) and Peak MSE value (pMSE).

IIUC these would be read-only parameters describing current state of the
link which can be queried at any time. If this is the case, adding them
as attributes to ETHTOOL_MSG_LINKSTATE_GET_REPLY message seems most
fitting.

As for getting / setting the threshold, perhaps ETHTOOL_MSG_LINKINFO_GET
and ETHTOOL_MSG_LINKINFO_SET. Unless you expect more configurable
parameters like this in which case we may want to consider adding new
request type (e.g. link params or link management).

Michal

  parent reply	other threads:[~2020-05-11 14:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 14:13 signal quality and cable diagnostic Oleksij Rempel
2020-05-11 14:33 ` Andrew Lunn
2020-05-12  8:22   ` Oleksij Rempel
2020-05-12  8:54     ` Robert Schwebel
2020-05-14  7:13     ` [EXT] " Christian Herber
2020-05-14  8:28       ` Oleksij Rempel
2020-05-11 14:59 ` Michal Kubecek [this message]
2020-05-12  6:48   ` Oleksij Rempel
2020-05-12 13:04     ` Andrew Lunn
2020-05-24 21:28       ` Pavel Machek
2020-05-26  7:06       ` PHYs with advanced cable diagnostic support Oleksij Rempel
  -- strict thread matches above, loose matches on Subject: below --
2020-05-14  8:42 signal quality and cable diagnostic Christian Herber
2020-05-24 21:27 ` Pavel Machek
2020-05-24 22:42   ` Russell King - ARM Linux admin

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=20200511145926.GC8503@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=andrew@lunn.ch \
    --cc=christian.herber@nxp.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=david@protonic.nl \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marex@denx.de \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    /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).