netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Oleksij Rempel <o.rempel@pengutronix.de>
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>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3 2/3] net: phy: dp83td510: add cable testing support
Date: Sat, 11 Jun 2022 17:12:07 +0200	[thread overview]
Message-ID: <YqSwx63kJQUlEVBH@lunn.ch> (raw)
In-Reply-To: <20220608123236.792405-3-o.rempel@pengutronix.de>

> +	} else {
> +		/* Most probably we have active link partner */
> +		stat = ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC;
> +	}

So drivers will make a few attempts to get a valid result. Have you
tried that?

> +
> +	*finished = true;
> +
> +	ethnl_cable_test_result(phydev, ETHTOOL_A_CABLE_PAIR_A, stat);
> +
> +	/* Reset state machine, otherwise at least other TDR attempts may
> +	 * provide not reliable results.
> +	 */
> +	return phy_set_bits(phydev, MII_BMCR, BMCR_RESET);

I thought i made the comment that you should use the helper? The
helper will wait around for the bit to clear indicating the PHY is
ready for further configuration.

      Andrew

  reply	other threads:[~2022-06-11 15:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 12:32 [PATCH net-next v3 0/3] net: phy: dp83td510: add cable diag support Oleksij Rempel
2022-06-08 12:32 ` [PATCH net-next v3 1/3] net: phy: dp83td510: add SQI support Oleksij Rempel
2022-06-11 15:08   ` Andrew Lunn
2022-06-08 12:32 ` [PATCH net-next v3 2/3] net: phy: dp83td510: add cable testing support Oleksij Rempel
2022-06-11 15:12   ` Andrew Lunn [this message]
2022-06-08 12:32 ` [PATCH net-next v3 3/3] net: phy: dp83td510: disable cable test support for 1Vpp PHYs Oleksij Rempel
2022-06-11 15:16   ` Andrew Lunn
2022-06-11 15:23     ` Marc Kleine-Budde
2022-06-08 14:28 ` [PATCH net-next v3 0/3] net: phy: dp83td510: add cable diag support Jakub Kicinski

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=YqSwx63kJQUlEVBH@lunn.ch \
    --to=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=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).