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>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>
Subject: Re: [PATCH net-next v2 3/3] phy: dp83td510: Utilize ALCD for cable length measurement when link is active
Date: Tue, 20 Aug 2024 19:59:07 +0200	[thread overview]
Message-ID: <ZsTZa5EsK9y32Yl3@pengutronix.de> (raw)
In-Reply-To: <a02698f3-94b6-4e6c-b13a-7fbeba2ce42f@lunn.ch>

On Tue, Aug 20, 2024 at 06:49:00PM +0200, Andrew Lunn wrote:
> > +static int dp83td510_cable_test_get_status(struct phy_device *phydev,
> > +					   bool *finished)
> > +{
> > +	*finished = false;
> > +
> > +	if (!phydev->link)
> > +		return dp83td510_cable_test_get_tdr_status(phydev, finished);
> > +
> > +	return dp83td510_cable_test_get_alcd_status(phydev, finished);
> 
> Sorry, missed this earlier. It seems like there is a race here. It
> could be the cable test was started without link, but when phylib
> polls a few seconds later link could of established. Will valid ALCD
> results be returned?

Hm.. probably not. In this case the best option I have is to store
results in the priv. Will it be acceptable?

-- 
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-20 17:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20 10:12 [PATCH net-next v2 0/3] Add ALCD Support to Cable Testing Interface Oleksij Rempel
2024-08-20 10:12 ` [PATCH net-next v2 1/3] ethtool: Extend cable testing interface with result source information Oleksij Rempel
2024-08-20 16:40   ` Andrew Lunn
2024-08-20 22:01   ` Jakub Kicinski
2024-08-20 10:12 ` [PATCH net-next v2 2/3] ethtool: Add support for specifying information source in cable test results Oleksij Rempel
2024-08-20 16:44   ` Andrew Lunn
2024-08-20 10:12 ` [PATCH net-next v2 3/3] phy: dp83td510: Utilize ALCD for cable length measurement when link is active Oleksij Rempel
2024-08-20 16:49   ` Andrew Lunn
2024-08-20 17:59     ` 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=ZsTZa5EsK9y32Yl3@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=andrew@lunn.ch \
    --cc=corbet@lwn.net \
    --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®