aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phylink.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-06-25 10:44:33 +0100
committerDavid S. Miller <davem@davemloft.net>2019-06-28 14:42:19 -0700
commit32e454efbb2279b0fa5874abb0944a9d42080ad1 (patch)
treebdea93e59f3a40d580a8c984c4e32e3ab06bb738 /include/linux/phylink.h
parentnet: ethernet: ti: cpsw: Assign OF node to slave devices (diff)
downloadlinux-dev-32e454efbb2279b0fa5874abb0944a9d42080ad1.tar.xz
linux-dev-32e454efbb2279b0fa5874abb0944a9d42080ad1.zip
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. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phylink.h')
-rw-r--r--include/linux/phylink.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/phylink.h b/include/linux/phylink.h
index 2d2e55dfea94..5b130140fb8f 100644
--- a/include/linux/phylink.h
+++ b/include/linux/phylink.h
@@ -93,12 +93,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);