* [PATCH] net: phylink: further documentation clarifications
@ 2019-06-25 9:44 Russell King
2019-06-25 12:38 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Russell King @ 2019-06-25 9:44 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev
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>
---
include/linux/phylink.h | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/linux/phylink.h b/include/linux/phylink.h
index c5f3349e6824..6450bbf36e71 100644
--- a/include/linux/phylink.h
+++ b/include/linux/phylink.h
@@ -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);
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: phylink: further documentation clarifications
2019-06-25 9:44 [PATCH] net: phylink: further documentation clarifications Russell King
@ 2019-06-25 12:38 ` Andrew Lunn
2019-06-26 2:16 ` Florian Fainelli
2019-06-28 21:43 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2019-06-25 12:38 UTC (permalink / raw)
To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev
On Tue, Jun 25, 2019 at 10:44:33AM +0100, Russell King wrote:
> 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>
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: phylink: further documentation clarifications
2019-06-25 9:44 [PATCH] net: phylink: further documentation clarifications Russell King
2019-06-25 12:38 ` Andrew Lunn
@ 2019-06-26 2:16 ` Florian Fainelli
2019-06-28 21:43 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2019-06-26 2:16 UTC (permalink / raw)
To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev
On 6/25/2019 2:44 AM, Russell King wrote:
> 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: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: phylink: further documentation clarifications
2019-06-25 9:44 [PATCH] net: phylink: further documentation clarifications Russell King
2019-06-25 12:38 ` Andrew Lunn
2019-06-26 2:16 ` Florian Fainelli
@ 2019-06-28 21:43 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-06-28 21:43 UTC (permalink / raw)
To: rmk+kernel; +Cc: andrew, f.fainelli, hkallweit1, netdev
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Tue, 25 Jun 2019 10:44:33 +0100
> 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>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-28 21:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 9:44 [PATCH] net: phylink: further documentation clarifications Russell King
2019-06-25 12:38 ` Andrew Lunn
2019-06-26 2:16 ` Florian Fainelli
2019-06-28 21:43 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).