5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ioana Ciornei <ioana.ciornei@xxxxxxx> [ Upstream commit 293e9a3d950dfebc76d9fa6931e6f91ef856b9ab ] These functions are currently used by phy_interrupt() to either signal an error condition or to trigger the link state machine. In an attempt to actually support shared PHY IRQs, export these two functions so that the actual PHY drivers can use them. Cc: Alexandru Ardelean <alexandru.ardelean@xxxxxxxxxx> Cc: Andre Edich <andre.edich@xxxxxxxxxxxxx> Cc: Antoine Tenart <atenart@xxxxxxxxxx> Cc: Baruch Siach <baruch@xxxxxxxxxx> Cc: Christophe Leroy <christophe.leroy@xxxxxx> Cc: Dan Murphy <dmurphy@xxxxxx> Cc: Divya Koppera <Divya.Koppera@xxxxxxxxxxxxx> Cc: Florian Fainelli <f.fainelli@xxxxxxxxx> Cc: Hauke Mehrtens <hauke@xxxxxxxxxx> Cc: Heiner Kallweit <hkallweit1@xxxxxxxxx> Cc: Jerome Brunet <jbrunet@xxxxxxxxxxxx> Cc: Kavya Sree Kotagiri <kavyasree.kotagiri@xxxxxxxxxxxxx> Cc: Linus Walleij <linus.walleij@xxxxxxxxxx> Cc: Marco Felsch <m.felsch@xxxxxxxxxxxxxx> Cc: Marek Vasut <marex@xxxxxxx> Cc: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx> Cc: Mathias Kresin <dev@xxxxxxxxx> Cc: Maxim Kochetkov <fido_max@xxxxxxxx> Cc: Michael Walle <michael@xxxxxxxx> Cc: Neil Armstrong <narmstrong@xxxxxxxxxxxx> Cc: Nisar Sayed <Nisar.Sayed@xxxxxxxxxxxxx> Cc: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> Cc: Philippe Schenker <philippe.schenker@xxxxxxxxxxx> Cc: Willy Liu <willy.liu@xxxxxxxxxxx> Cc: Yuiko Oshino <yuiko.oshino@xxxxxxxxxxxxx> Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Stable-dep-of: 256748d5480b ("net: phy: ti: add PHY_RST_AFTER_CLK_EN flag") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> --- drivers/net/phy/phy.c | 6 ++++-- include/linux/phy.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index f3e606b6617e9..eb0f2e11cc216 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -461,10 +461,11 @@ EXPORT_SYMBOL(phy_queue_state_machine); * * @phydev: the phy_device struct */ -static void phy_trigger_machine(struct phy_device *phydev) +void phy_trigger_machine(struct phy_device *phydev) { phy_queue_state_machine(phydev, 0); } +EXPORT_SYMBOL(phy_trigger_machine); static void phy_abort_cable_test(struct phy_device *phydev) { @@ -970,7 +971,7 @@ void phy_stop_machine(struct phy_device *phydev) * Must not be called from interrupt context, or while the * phydev->lock is held. */ -static void phy_error(struct phy_device *phydev) +void phy_error(struct phy_device *phydev) { WARN_ON(1); @@ -980,6 +981,7 @@ static void phy_error(struct phy_device *phydev) phy_trigger_machine(phydev); } +EXPORT_SYMBOL(phy_error); /** * phy_disable_interrupts - Disable the PHY interrupts from the PHY side diff --git a/include/linux/phy.h b/include/linux/phy.h index 08725a262f320..203d53ea19d1b 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1542,8 +1542,10 @@ void phy_drivers_unregister(struct phy_driver *drv, int n); int phy_driver_register(struct phy_driver *new_driver, struct module *owner); int phy_drivers_register(struct phy_driver *new_driver, int n, struct module *owner); +void phy_error(struct phy_device *phydev); void phy_state_machine(struct work_struct *work); void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies); +void phy_trigger_machine(struct phy_device *phydev); void phy_mac_interrupt(struct phy_device *phydev); void phy_start_machine(struct phy_device *phydev); void phy_stop_machine(struct phy_device *phydev); -- 2.43.0