Re: Link down reasons

2020-05-29 Thread Petr Machata
Andrew Lunn 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

Re: Link down reasons

2020-05-28 Thread Andrew Lunn
On Thu, May 28, 2020 at 06:54:24PM +0200, Petr Machata wrote: > > Andrew Lunn writes: > > >> Andrew, pardon my ignorance in these matters, can a PHY driver in > >> general determine that the issue is with the cable, even without running > >> the fairly expensive cable test? > > > > No. To diagno

Re: Link down reasons

2020-05-28 Thread Michal Kubecek
On Thu, May 28, 2020 at 06:54:24PM +0200, Petr Machata wrote: > In another e-mail you suggested this: > > Link detected: no (cable issue) > > But if the link just silently falls back to 100Mbps, there would never > be an opportunity for phy to actually report a down reason. So there > probabl

Re: Link down reasons

2020-05-28 Thread Petr Machata
Andrew Lunn writes: >> Andrew, pardon my ignorance in these matters, can a PHY driver in >> general determine that the issue is with the cable, even without running >> the fairly expensive cable test? > > No. To diagnose a problem, you need the link to be idle. If the link > peer is sending fra

Re: Link down reasons

2020-05-28 Thread Andrew Lunn
> Andrew, pardon my ignorance in these matters, can a PHY driver in > general determine that the issue is with the cable, even without running > the fairly expensive cable test? No. To diagnose a problem, you need the link to be idle. If the link peer is sending frames, they interfere with TDR. So

Re: Link down reasons

2020-05-28 Thread Oleksij Rempel
On Thu, May 28, 2020 at 11:22:47AM +0200, Petr Machata wrote: > > Oleksij Rempel writes: > > > I would add some more reasons: > > - master slave resolution issues: both link partners are master or > > slave. > > I guess we should send the RFC, so that we can talk particulars. We > currently d

Re: Link down reasons

2020-05-28 Thread Petr Machata
Oleksij Rempel writes: > I would add some more reasons: > - master slave resolution issues: both link partners are master or > slave. I guess we should send the RFC, so that we can talk particulars. We currently don't have anything like master/slave mismatch in the API, but that's just becau

Re: Link down reasons

2020-05-28 Thread Petr Machata
Amit Cohen writes: > Andrew Lunn writes: > >>On Wed, May 27, 2020 at 03:41:22PM +, Amit Cohen wrote: >>> Hi Andrew, >>> >>> We are planning to send a set that exposes link-down reason in ethtool. >>> >>> It seems that the ability of your set “Ethernet cable test support” >>> can be integra

Re: Link down reasons

2020-05-28 Thread Oleksij Rempel
On Wed, May 27, 2020 at 03:41:22PM +, Amit Cohen wrote: > Hi Andrew, > We are planning to send a set that exposes link-down reason in ethtool. > It seems that the ability of your set "Ethernet cable test support" can be > integrated with link-down reason. > > The idea is to expose reason and

RE: Link down reasons

2020-05-27 Thread Amit Cohen
Andrew Lunn writes: >On Wed, May 27, 2020 at 03:41:22PM +, Amit Cohen wrote: >> Hi Andrew, >> >> We are planning to send a set that exposes link-down reason in ethtool. >> >> It seems that the ability of your set “Ethernet cable test support” >> can be integrated with link-down reason. >>

Re: Link down reasons

2020-05-27 Thread Andrew Lunn
On Wed, May 27, 2020 at 03:41:22PM +, Amit Cohen wrote: > Hi Andrew, > > We are planning to send a set that exposes link-down reason in ethtool. > > It seems that the ability of your set “Ethernet cable test support” can be > integrated with link-down reason. > > > > The idea is to expose