diff options
| author | David S. Miller <[email protected]> | 2023-05-26 10:39:41 +0100 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2023-05-26 10:39:41 +0100 |
| commit | eba7dbc5eba06a503ba78fdfb4488dbaaeed9471 (patch) | |
| tree | f153403dd85604db59a125b699b1426f35985426 /include | |
| parent | 9b66ee06e5ca2698d0ba12a7ad7188cb724279e7 (diff) | |
| parent | 267d7692f6cd5c9b8796324cdd54db594ca8d3e4 (diff) | |
Merge branch 'mv88e6xxx-phylink-prepare'
Russell King says:
====================
net: dsa: mv88e6xxx: prepare for phylink_pcs conversion
These two patches provide some preparation for converting the mv88e6xxx
DSA driver to use phylink_pcs rather than bolting the serdes bits into
the MAC calls.
In order to correctly drive mv88e6xxx hardware when the PCS code is
split, we need to force the link down while changing the configuration
of a port. This is provided for via the mac_prepare() and mac_finish()
methods, but DSA does not forward these on to DSA drivers.
Patch 1 adds support to the DSA core to forward these two methods to
DSA drivers, and patch 2 moves the code from mv88e6xxx_mac_config()
into the respective methods.
====================
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/dsa.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 8903053fa5aa..75022cf771cf 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -867,9 +867,15 @@ struct dsa_switch_ops { phy_interface_t iface); int (*phylink_mac_link_state)(struct dsa_switch *ds, int port, struct phylink_link_state *state); + int (*phylink_mac_prepare)(struct dsa_switch *ds, int port, + unsigned int mode, + phy_interface_t interface); void (*phylink_mac_config)(struct dsa_switch *ds, int port, unsigned int mode, const struct phylink_link_state *state); + int (*phylink_mac_finish)(struct dsa_switch *ds, int port, + unsigned int mode, + phy_interface_t interface); void (*phylink_mac_an_restart)(struct dsa_switch *ds, int port); void (*phylink_mac_link_down)(struct dsa_switch *ds, int port, unsigned int mode, |