Re: [PATCH net v1 1/1] ethtool: netlink: do not return SQI value if link is down

From: Andrew Lunn
Date: Mon Jul 08 2024 - 09:30:47 EST


> If -ENETDOWN is returned:
> Settings for spe4:
> Supported ports: [ TP ]
> Supported link modes: 100baseT1/Fulli
> Supported pause frame use: No
> Supports auto-negotiation: No
> Supported FEC modes: Not reported
> Advertised link modes: 100baseT1/Full
> Advertised pause frame use: No
> Advertised auto-negotiation: No
> Advertised FEC modes: Not reported
> Speed: 100Mb/s
> Duplex: Full
> Auto-negotiation: off
> master-slave cfg: forced slave
> master-slave status: unknown
> Port: Twisted Pair
> PHYAD: 6
> Transceiver: external
> MDI-X: Unknown
> Supports Wake-on: d
> Wake-on: d
> netlink error: Network is down
>
> Instead of "Link detected: no", we will get netlink error.

Thanks. This is not great. There was a slim chance it looked at each
individual return value, and would of put "SQI: Network is down", but
it does not. So not including the value does seem the best.

Andrew