On Fri, Nov 05, 2021 at 04:36:48PM +0100, bage@linutronix.de wrote:
From: Bastian Germann <redacted>
Take the return of phy_start_aneg into account so that ethtool will handle
negotiation errors and not silently accept invalid input.
Hi Bastian
What PHY driver are you using this with? phy_start_aneg() generally
does not return errors, except for -EIO/-TIMEDOUT because
communication with the PHY has failed. All parameter validation should
of already happened before the call to phy_start_aneg(). So i'm
wondering if the PHY driver is doing something wrong.
The change itself however does seems sensible. If the PHY has
disappeared, returning -EIO would be valid.
Andrew