diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2020-03-20 10:53:34 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-24 05:01:58 +0100 |
commit | f84752d0803a6b3a9b42ecdce3e814762debb2fe (patch) | |
tree | f74a60c9c504488cbc3686b09fa8eb504a94180d /drivers/net/phy | |
parent | mlxsw: spectrum_cnt: Fix 64-bit division in mlxsw_sp_counter_resources_register (diff) | |
download | linux-f84752d0803a6b3a9b42ecdce3e814762debb2fe.tar.xz linux-f84752d0803a6b3a9b42ecdce3e814762debb2fe.zip |
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')
-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; } |