Subject: Re: Link down reasons

From: Petr Machata <[email-masked]>
Date: Fri, 29 May 2020 11:03:28 +0200

Andrew Lunn <[email-masked]> writes:

> It is called downshift. And we have support for it in the phylib core,
> if the PHY has the needed vendor register.
>
> https://elixir.bootlin.com/linux/v5.7-rc7/source/drivers/net/phy/phy-core.c#L341
> https://elixir.bootlin.com/linux/v5.7-rc7/source/drivers/net/phy/phy.c#L95

Thanks for the references.

> So in theory we could report:
>
> Link detected: yes (downshifted)
>
> Assuming your proposed API support a reason why it is up, not just a
> reason why it is down?

Michal Kubecek <[email-masked]> writes:

> Perhaps we could use more general name than "link down reason", e.g.
> "extended state", and it could be reported even if the link is still up

All right, that makes sense to me. Let's make it extended state.

Thanks!