Subject: Re: [PATCH net-next v1 2/9] net: phy: Add support for polling cable test

From: Andrew Lunn <[email-masked]>
Date: Mon, 27 Apr 2020 00:07:14 +0200

> > 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.

I did wonder about setting a big timeout in the core. If after 20
seconds it has not returned any results, we probably need to move to
the error state? But that only works for polling. For interrupt driven
PHYs we don't have any sort of timer, we would need to add more
infrastructure to the core.

If the PHY never completed the cable test, we are probably in the land
of driver bugs, and how do we recover from that?

    Andrew