summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-06-23 13:30:31 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2020-06-28 17:01:10 +0100
commitab177c909859cd8a8fc892318a9ad0a2f5552718 (patch)
treed9f96f749f99d79c527409dc969e320f28ee4bd4 /include
parent776b70d2b1e941b766bede3a0647941b3d520930 (diff)
net: phylink: in-band pause mode advertisement update for PCS
Re-code the pause in-band advertisement update in light of the addition of PCS support, so that we perform the minimum required; only the PCS configuration function needs to be called in this case, followed by the request to trigger a restart of negotiation if the programmed advertisement changed. We need to change the pcs_config() signature to pass whether resolved pause should be passed to the MAC for setups such as mvneta and mvpp2 where doing so overrides the MAC manual flow controls. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/phylink.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/phylink.h b/include/linux/phylink.h
index b32b8b45421b..d9913d8e6b91 100644
--- a/include/linux/phylink.h
+++ b/include/linux/phylink.h
@@ -286,7 +286,8 @@ struct phylink_pcs_ops {
struct phylink_link_state *state);
int (*pcs_config)(struct phylink_config *config, unsigned int mode,
phy_interface_t interface,
- const unsigned long *advertising);
+ const unsigned long *advertising,
+ bool permit_pause_to_mac);
void (*pcs_an_restart)(struct phylink_config *config);
void (*pcs_link_up)(struct phylink_config *config, unsigned int mode,
phy_interface_t interface, int speed, int duplex);
@@ -317,9 +318,11 @@ void pcs_get_state(struct phylink_config *config,
* @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
* @interface: interface mode to be used
* @advertising: adertisement ethtool link mode mask
+ * @permit_pause_to_mac: permit forwarding pause resolution to MAC
*
* Configure the PCS for the operating mode, the interface mode, and set
- * the advertisement mask.
+ * the advertisement mask. @permit_pause_to_mac indicates whether the
+ * hardware may forward the pause mode resolution to the MAC.
*
* When operating in %MLO_AN_INBAND, inband should always be enabled,
* otherwise inband should be disabled.