diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2020-03-20 12:53:34 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-24 07:01:58 +0300 |
commit | f84752d0803a6b3a9b42ecdce3e814762debb2fe (patch) | |
tree | f74a60c9c504488cbc3686b09fa8eb504a94180d /drivers/net/phy/mdio-xpcs.c | |
parent | c31f0ea737e60845392f14ea657cb3abfce83856 (diff) | |
download | linux-f84752d0803a6b3a9b42ecdce3e814762debb2fe.tar.xz |
net: phy: xpcs: Return error when 10GKR link errors are found
For 10GKR rate, when link errors are found we need to return fault
status so that XPCS is correctly resumed.
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/mdio-xpcs.c')
-rw-r--r-- | drivers/net/phy/mdio-xpcs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio-xpcs.c b/drivers/net/phy/mdio-xpcs.c index 2f4cdf807160..c04e9bf40180 100644 --- a/drivers/net/phy/mdio-xpcs.c +++ b/drivers/net/phy/mdio-xpcs.c @@ -255,8 +255,10 @@ static int xpcs_read_fault(struct mdio_xpcs_args *xpcs, if (ret < 0) return ret; - if (ret & MDIO_PCS_10GBRT_STAT2_ERR) + if (ret & MDIO_PCS_10GBRT_STAT2_ERR) { xpcs_warn(xpcs, state, "Link has errors!\n"); + return -EFAULT; + } return 0; } |