summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-07-21 12:04:36 +0100
committerDavid S. Miller <davem@davemloft.net>2020-07-21 15:46:50 -0700
commit1571e700fd610c39e8b50b0110b1ee9badb2fe6a (patch)
treebeec579c3ff434a1d9e4ef8462b6c94ac0a36f2d /include
parent1e1bf14a89c0f5d11b62a8974dc53862e214b131 (diff)
downloadlinux-1571e700fd610c39e8b50b0110b1ee9badb2fe6a.tar.bz2
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> Signed-off-by: David S. Miller <davem@davemloft.net>
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.