net: phylink: further documentation clarifications
Subsystems (3)
PATCH 1/1 net: phylink: further documentation clarifications
Clarify the validate() behaviour in a few cases which weren't mentioned in the documentation, but which are necessary for users to get the correct behaviour.
--- include/linux/phylink.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
include/linux/phylink.h +9 -2
@@ -94,12 +94,19 @@ struct phylink_mac_ops {* Note that the PHY may be able to transform from one connection * technology to another, so, eg, don't clear 1000BaseX just * because the MAC is unable to BaseX mode. This is more about -* clearing unsupported speeds and duplex settings. +* clearing unsupported speeds and duplex settings. The port modes +* should not be cleared; phylink_set_port_modes() will help with this. * * If the @state->interface mode is %PHY_INTERFACE_MODE_1000BASEX * or %PHY_INTERFACE_MODE_2500BASEX, select the appropriate mode * based on @state->advertising and/or @state->speed and update -* @state->interface accordingly. +* @state->interface accordingly. See phylink_helper_basex_speed(). +* +* When @state->interface is %PHY_INTERFACE_MODE_NA, phylink expects the +* MAC driver to return all supported link modes. +* +* If the @state->interface mode is not supported, then the @supported +* mask must be cleared. */ void validate (struct net_device *ndev,unsigned long *supported,struct phylink_link_state *state);
Signature · 1 line
2.7.4
Quoted 5 lines · Russell King
Clarify the
validate()behaviour in a few cases which weren't mentioned in the documentation, but which are necessary for users to get the correct behaviour.Signed-off-by Russell King <[email protected]>
Andrew
Quoted 5 lines · Russell King
Clarify the
validate()behaviour in a few cases which weren't mentioned in the documentation, but which are necessary for users to get the correct behaviour.Signed-off-by Russell King <[email protected]>
Signature · 1 line
Florian
From: Russell King <[email protected]>
Date: Tue, 25 Jun 2019 10:44:33 +0100
Quoted 5 lines
Clarify the
validate()behaviour in a few cases which weren't mentioned in the documentation, but which are necessary for users to get the correct behaviour.Signed-off-by Russell King <[email protected]>
Applied.