diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-11-23 20:17:42 +0000 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-04-04 14:40:25 +0100 |
commit | a9b4a82e07e472cf5c14ac993b2da38e427f416a (patch) | |
tree | 7084ff9849697ed1f7656ac7929a7b9889117740 | |
parent | dc8b93299eb40f08f8e813d9d4f21dc3e497455b (diff) |
net: phylink: pass PHY interface mode into MAC LPI methods
Ass the PHY interface mode into mac_disable_tx_lpi() and
mac_enable_tx_lpi() methods.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | drivers/net/phy/phylink.c | 5 | ||||
-rw-r--r-- | include/linux/phylink.h | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 308fa74eb1f7..aff3313d4de7 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -1612,7 +1612,7 @@ static void phylink_deactivate_lpi(struct phylink *pl) phylink_dbg(pl, "disabling LPI\n"); - pl->mac_ops->mac_disable_tx_lpi(pl->config); + pl->mac_ops->mac_disable_tx_lpi(pl->config, pl->cur_interface); phylink_pcs_disable_eee(pl->pcs); } @@ -1633,7 +1633,8 @@ static void phylink_activate_lpi(struct phylink *pl) phylink_pcs_enable_eee(pl->pcs); - err = pl->mac_ops->mac_enable_tx_lpi(pl->config, pl->mac_tx_lpi_timer, + err = pl->mac_ops->mac_enable_tx_lpi(pl->config, pl->cur_interface, + pl->mac_tx_lpi_timer, pl->mac_tx_clk_stop); if (!err) { pl->mac_enable_tx_lpi = true; diff --git a/include/linux/phylink.h b/include/linux/phylink.h index e7059ad47e20..2f8efd3aff10 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -208,8 +208,10 @@ struct phylink_mac_ops { struct phy_device *phy, unsigned int mode, phy_interface_t interface, int speed, int duplex, bool tx_pause, bool rx_pause); - void (*mac_disable_tx_lpi)(struct phylink_config *config); - int (*mac_enable_tx_lpi)(struct phylink_config *config, u32 timer, + void (*mac_disable_tx_lpi)(struct phylink_config *config, + phy_interface_t interface); + int (*mac_enable_tx_lpi)(struct phylink_config *config, + phy_interface_t interface, u32 timer, bool tx_clk_stop); }; @@ -409,15 +411,18 @@ void mac_link_up(struct phylink_config *config, struct phy_device *phy, /** * mac_disable_tx_lpi() - disable LPI generation at the MAC * @config: a pointer to a &struct phylink_config. + * @interface: current link &typedef phy_interface_t mode * * Disable generation of LPI at the MAC, effectively preventing the MAC * from indicating that it is idle. */ -void mac_disable_tx_lpi(struct phylink_config *config); +void mac_disable_tx_lpi(struct phylink_config *config, + phy_interface_t interface); /** * mac_enable_tx_lpi() - configure and enable LPI generation at the MAC * @config: a pointer to a &struct phylink_config. + * @interface: current link &typedef phy_interface_t mode * @timer: LPI timeout in microseconds. * @tx_clk_stop: allow xMII transmit clock to be stopped during LPI * @@ -430,8 +435,8 @@ void mac_disable_tx_lpi(struct phylink_config *config); * * Returns: 0 on success. Please consult with rmk before returning an error. */ -int mac_enable_tx_lpi(struct phylink_config *config, u32 timer, - bool tx_clk_stop); +int mac_enable_tx_lpi(struct phylink_config *config, phy_interface_t interface, + u32 timer, bool tx_clk_stop); #endif struct phylink_pcs_ops; |