mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v1 1/1] net: phy: dp83tg720: Add cable testing support
Date: Thu, 8 Aug 2024 10:16:03 +0200	[thread overview]
Message-ID: <ZrR-w7phB1DZL3kt@pengutronix.de> (raw)
In-Reply-To: <ff096c1c-00bf-4e55-9400-fb869749b07f@lunn.ch>

On Wed, Aug 07, 2024 at 03:24:52PM +0200, Andrew Lunn wrote:
> On Wed, Aug 07, 2024 at 11:32:51AM +0200, Oleksij Rempel wrote:
> > Introduce cable testing support for the DP83TG720 PHY. This implementation
> > is based on the "DP83TG720S-Q1: Configuring for Open Alliance Specification
> > Compliance (Rev. B)" application note.
> 
> Does the OA specification describe all these registers?

Not all of them.

OA specification provide recommendation for the bit layout for the TDR
status register (HDD.TDR):
https://opensig.org/wp-content/uploads/2024/03/Advanced_PHY_features_for_automotive_Ethernet_v2.0_fin.pdf

> Should we expect other devices to be identical?

Yes. I'll create a new file for OA specific helpers.

> > +/**
> > + * dp83tg720_get_fault_type - Convert TDR fault type to ethtool result code.
> > + * @fault_type: Fault type value from the PHY.
> > + *
> > + * Returns: Corresponding ethtool result code.
> > + */
> > +static int dp83tg720_get_fault_type(int fault_type)
> > +{
> > +	switch (fault_type) {
> > +	case DP83TG720S_TDR_FAULT_TYPE_SHORT:
> > +		return ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT;
> > +	case DP83TG720S_TDR_FAULT_TYPE_OPEN:
> > +		return ETHTOOL_A_CABLE_RESULT_CODE_OPEN;
> > +	case DP83TG720S_TDR_FAULT_TYPE_NOISE:
> > +		return ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC;
> 
> You could add a new type for this. I think some implementations will
> also re-try a few times to see if a quiet period can be found.

ack.

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

      reply	other threads:[~2024-08-08  8:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07  9:32 Oleksij Rempel
2024-08-07 11:10 ` Oleksij Rempel
2024-08-07 13:24 ` Andrew Lunn
2024-08-08  8:16   ` Oleksij Rempel [this message]

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=ZrR-w7phB1DZL3kt@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.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=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

all inboxes | Powered by JetHome®