net: sfp: report error on failure to read sfp soft status
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 17 Dec 2019 13:50:29 +0000 (13:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Dec 2019 01:26:07 +0000 (17:26 -0800)
commit0dea4d039a7fdd97790a71da37c1ce67a5b52769
tree628fef0b7ceb4e4da3eaf73342504a077e004e3e
parentd8e419da048e45a8258b9721e85232dbb25ac618
net: sfp: report error on failure to read sfp soft status

Report a rate-limited error if we fail to read the SFP soft status,
and preserve the current status in that case. This avoids I2C bus
errors from triggering a link flap.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp.c