netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Chris Healy <cphealy@gmail.com>,
	Michal Kubecek <mkubecek@suse.cz>
Subject: Re: [PATCH net-next v1 2/9] net: phy: Add support for polling cable test
Date: Sun, 26 Apr 2020 14:19:55 -0700	[thread overview]
Message-ID: <52b62cec-cb65-03a4-f5c2-e36d0d0ff8d3@gmail.com> (raw)
In-Reply-To: <20200425201014.GF1088354@lunn.ch>



On 4/25/2020 1:10 PM, Andrew Lunn wrote:
> On Sat, Apr 25, 2020 at 12:49:46PM -0700, Florian Fainelli wrote:
>> Hi Andrew,
>>
>> On 4/25/2020 11:06 AM, Andrew Lunn wrote:
>>> Some PHYs are not capable of generating interrupts when a cable test
>>> finished. They do however support interrupts for normal operations,
>>> like link up/down. As such, the PHY state machine would normally not
>>> poll the PHY.
>>>
>>> Add support for indicating the PHY state machine must poll the PHY
>>> when performing a cable test.
>>>
>>> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
>>
>> If you started a cable test and killed the ethtool process before the
>> cable diagnostics are available, the state machine gets stuck in that
>> state, so we should find a way to propagate the signal all the way to
>> the PHY library somehow.
> 
> Hi Florian
> 
> It should not matter if the user space tool goes away. As you read
> later patches you will see why. But:
> 
> ETHTOOL_MSG_CABLE_TEST_ACT is an action to trigger cable
> test. Assuming the driver supports it etc, the cable test is started,
> and user space immediately gets a ETHTOOL_MSG_CABLE_TEST_ACT_REPLY.
> The state is changed to PHY_CABLETEST.
> 
> Sometime later, the driver indicates the cable test has
> completed. This can be an interrupt, or because it is being polled.  A
> ETHTOOL_MSG_CABLE_TEST_NTF is multicast to user space with the
> results. And the PHY then leaves state PHY_CABLETEST. If there is no
> user space listening for the ETHTOOL_MSG_CABLE_TEST_NTF, it does not
> matter.
> 
> At least with the Marvell PHY, there is no documented way to tell it
> to abort a cable test. So knowing the user space has lost interest in
> the results does not help us.

The same is true with Broadcom PHYs, but I think we should be guarding
somehow against the PHY state machine being left in PHY_CABLETEST state
with no other way to recover than do an ip link set down/up in order to
recover it. We can try to tackle this as an improvement later on.
-- 
Florian

  reply	other threads:[~2020-04-26 21:20 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25 18:06 [PATCH net-next v1 0/9] Ethernet Cable test support Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 1/9] net: phy: Add cable test support to state machine Andrew Lunn
2020-04-26 19:46   ` Michal Kubecek
2020-04-26 20:31     ` Andrew Lunn
2020-04-26 21:22   ` Florian Fainelli
2020-04-25 18:06 ` [PATCH net-next v1 2/9] net: phy: Add support for polling cable test Andrew Lunn
2020-04-25 19:49   ` Florian Fainelli
2020-04-25 20:10     ` Andrew Lunn
2020-04-26 21:19       ` Florian Fainelli [this message]
2020-04-26 22:07         ` Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 3/9] net: ethtool: netlink: Add support for triggering a " Andrew Lunn
2020-04-26 19:36   ` Michal Kubecek
2020-04-26 20:38     ` Andrew Lunn
2020-04-26 20:50       ` Michal Kubecek
2020-04-25 18:06 ` [PATCH net-next v1 4/9] net: ethtool: Add attributes for cable test reports Andrew Lunn
2020-04-25 20:00   ` Randy Dunlap
2020-04-26 20:25   ` Michal Kubecek
2020-04-26 21:12     ` Andrew Lunn
2020-04-27  7:13       ` Michal Kubecek
2020-04-29 16:16   ` Michael Walle
2020-04-29 18:57     ` Andrew Lunn
2020-04-29 18:58       ` Florian Fainelli
2020-04-29 19:32         ` Michael Walle
2020-04-25 18:06 ` [PATCH net-next v1 5/9] net: ethtool: Make helpers public Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 6/9] net: ethtool: Add infrastructure for reporting cable test results Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 7/9] net: ethtool: Add helpers for reporting " Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 8/9] net: phy: marvell: Add cable test support Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 9/9] net: phy: Put interface into oper testing during cable test Andrew Lunn
2020-04-29 16:02 ` [PATCH net-next v1 0/9] Ethernet Cable test support Michael Walle
2020-04-29 16:32   ` Andrew Lunn
2020-04-30 17:48     ` Michael Walle
2020-04-30 18:23       ` Andrew Lunn
2020-04-30 19:44         ` Michael Walle
2020-04-30 20:51           ` Andrew Lunn
2020-04-30 18:34       ` Florian Fainelli
2020-04-30 19:31         ` Michael Walle
2020-04-30 19:38           ` Florian Fainelli
2020-04-30 19:52             ` Michael Walle
2020-04-30 19:41           ` Andrew Lunn
2020-04-30 20:01             ` Michael Walle
2020-04-30 20:56               ` Andrew Lunn
2020-04-30 20:04             ` Florian Fainelli
2020-04-30 20:13               ` Michael Walle
2020-04-30 20:19                 ` Florian Fainelli
2020-04-30 21:16                   ` Michael Walle

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=52b62cec-cb65-03a4-f5c2-e36d0d0ff8d3@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    /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).