On Wed, May 27, 2020 at 03:41:22PM +0000, 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 subreason (if there is): > $ ethtool ethX > ... > Link detected: no (No cable) // No sub reason > > $ ethtool ethY > Link detected: no (Autoneg failure, No partner detected) > > Currently we have reason "cable issue" and subreasons "unsupported cable" and "shorted cable". > The mechanism of cable test can be integrated and allow us report "cable issue" reason and "shorted cable" subreason. > > However, the way the kernel reports the results of the cable test (cable-test, some seconds, get-result) may be problematic with link-down reason concept. > We can ignore this information when reporting link-down reason, or report only if testing cable have a result, > or maybe start testing cable and meanwhile report something like "discovery in progress". But all the options are not perfect. > > We would like to know your opinion about it. I would add some more reasons: - master slave resolution issues: both link partners are master or slave. - signal quality drop. In this case driver should be extended to notify the system if SQI is under some configurable limit. Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |