net: phy: xpcs: Improvements for -next
Subsystems (3)
PATCH 4/4 net: phy: xpcs: Restart AutoNeg if outcome was invalid
In reply to Jose AbreuRestart AutoNeg if we didn't get a valid result from previous run.
---
Cc: Jose Abreu <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Heiner Kallweit <[email protected]>
Cc: Russell King <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/net/phy/mdio-xpcs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/phy/mdio-xpcs.c +3 -1
@@ -433,8 +433,10 @@ static int xpcs_aneg_done(struct mdio_xpcs_args *xpcs,return ret;/* Check if Aneg outcome is valid */ -if (!(ret &DW_C73_AN_ADV_SF )) +if (!(ret &DW_C73_AN_ADV_SF )) { +xpcs_config_aneg (xpcs);return 0 ; + }return 1 ; }
Signature · 1 line
2.7.4
PATCH 1/4 net: phy: xpcs: Return error when 10GKR link errors are found
In reply to Jose AbreuFor 10GKR rate, when link errors are found we need to return fault status so that XPCS is correctly resumed.
---
Cc: Jose Abreu <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Heiner Kallweit <[email protected]>
Cc: Russell King <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/net/phy/mdio-xpcs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/phy/mdio-xpcs.c +3 -1
@@ -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 ; }
Signature · 1 line
2.7.4
PATCH 2/4 net: phy: xpcs: Reset XPCS upon probe
In reply to Jose AbreuReset the XPCS upon probe stage so that we start it from well known state.
---
Cc: Jose Abreu <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Heiner Kallweit <[email protected]>
Cc: Russell King <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/net/phy/mdio-xpcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/mdio-xpcs.c +1 -1
@@ -688,7 +688,7 @@ static int xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface) match = entry;if (xpcs_check_features (xpcs, match, interface)) -return 0 ; +return xpcs_soft_reset (xpcs,MDIO_MMD_PCS ); } }
Signature · 1 line
2.7.4
PATCH 3/4 net: phy: xpcs: Set Link down if AutoNeg is enabled and did not finish
In reply to Jose AbreuSet XPCS Link as down when AutoNeg is enabled but it didn't finish with success.
---
Cc: Jose Abreu <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Heiner Kallweit <[email protected]>
Cc: Russell King <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/net/phy/mdio-xpcs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/phy/mdio-xpcs.c +3 -1
@@ -617,10 +617,12 @@ static int xpcs_get_state(struct mdio_xpcs_args *xpcs,return xpcs_config (xpcs, state); } -if (state->link && state->an_enabled &&xpcs_aneg_done (xpcs, state)) { +if (state->an_enabled &&xpcs_aneg_done (xpcs, state)) { state->an_complete = true;xpcs_read_lpa (xpcs, state);xpcs_resolve_lpa (xpcs, state); + }else if (state->an_enabled) { + state->link =0 ; }else if (state->link) {xpcs_resolve_pma (xpcs, state); }
Signature · 1 line
2.7.4
cover net: phy: xpcs: Improvements for -next
Misc set of improvements for XPCS. All for net-next.
Patch 1/4, returns link error upon 10GKR faults are detected.
Patch 2/4, resets XPCS upon probe so that we start from well known state.
Patch 3/4, sets Link as down if AutoNeg is enabled but did not finish with success.
Patch 4/4, restarts AutoNeg process if previous outcome was not valid.
---
Cc: Jose Abreu <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Heiner Kallweit <[email protected]>
Cc: Russell King <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
Jose Abreu (4):
net: phy: xpcs: Return error when 10GKR link errors are found
net: phy: xpcs: Reset XPCS upon probe
net: phy: xpcs: Set Link down if AutoNeg is enabled and did not finish
net: phy: xpcs: Restart AutoNeg if outcome was invalid
drivers/net/phy/mdio-xpcs.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
Signature · 1 line
2.7.4
David Miller
maintainerFrom: Jose Abreu <[email protected]>
Date: Fri, 20 Mar 2020 10:53:33 +0100
Quoted 10 lines
Misc set of improvements for XPCS. All for net-next.
Patch 1/4, returns link error upon 10GKR faults are detected.
Patch 2/4, resets XPCS upon probe so that we start from well known state.
Patch 3/4, sets Link as down if AutoNeg is enabled but did not finish with success.
Patch 4/4, restarts AutoNeg process if previous outcome was not valid.
Series applied, thanks Jose.