summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-04-14 15:28:26 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-06-21 10:57:32 +0100
commit2e6cfbfb8babb790117320815be1b3981fd3fc8d (patch)
tree0391482173d2d188b6655e53802435bba6341efd /include/linux
parent9c351ba9dbcfa5ef57a059e4a264a57b51c8af62 (diff)
net: phylink: add pcs_pre_config()/pcs_post_config() methods
Add hooks that are called before and after the mac_config() call, which will be needed to deal with errata workarounds for the Marvell 88e639x DSA switches. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/phylink.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/phylink.h b/include/linux/phylink.h
index fe4ac69f654b..ec94a4bb657c 100644
--- a/include/linux/phylink.h
+++ b/include/linux/phylink.h
@@ -431,6 +431,8 @@ struct phylink_pcs {
* @pcs_validate: validate the link configuration.
* @pcs_enable: enable the PCS.
* @pcs_disable: disable the PCS.
+ * @pcs_pre_config: pre-mac_config method (for errata)
+ * @pcs_post_config: post-mac_config method (for arrata)
* @pcs_get_state: read the current MAC PCS link state from the hardware.
* @pcs_config: configure the MAC PCS for the selected mode and state.
* @pcs_an_restart: restart 802.3z BaseX autonegotiation.
@@ -442,6 +444,10 @@ struct phylink_pcs_ops {
const struct phylink_link_state *state);
int (*pcs_enable)(struct phylink_pcs *pcs);
void (*pcs_disable)(struct phylink_pcs *pcs);
+ void (*pcs_pre_config)(struct phylink_pcs *pcs,
+ phy_interface_t interface);
+ int (*pcs_post_config)(struct phylink_pcs *pcs,
+ phy_interface_t interface);
void (*pcs_get_state)(struct phylink_pcs *pcs,
struct phylink_link_state *state);
int (*pcs_config)(struct phylink_pcs *pcs, unsigned int mode,