@@ -1040,10 +1040,11 @@ static irqreturn_t phy_interrupt(int irq, void *phy_dat)
* phy_enable_interrupts - Enable the interrupts from the PHY side
* @phydev: target phy_device struct
*/
-static int phy_enable_interrupts(struct phy_device *phydev)
+int phy_enable_interrupts(struct phy_device *phydev)
{
return phy_config_interrupt(phydev, PHY_INTERRUPT_ENABLED);
}
+EXPORT_SYMBOL(phy_enable_interrupts);
/**
* phy_request_interrupt - request and enable interrupt for a PHY device
@@ -1715,6 +1715,7 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd);
int phy_disable_interrupts(struct phy_device *phydev);
+int phy_enable_interrupts(struct phy_device *phydev);
void phy_request_interrupt(struct phy_device *phydev);
void phy_free_interrupt(struct phy_device *phydev);
void phy_print_status(struct phy_device *phydev);
Currently, phy_disable_interrupts() allows to disable interrupts without freeing them. However, the only exported function to re-enable them is phy_request_interrupt(), which also requests them again. It should be possible to re-enable interrupts without re-allocating them. This is required for lan78xx.c where we want to enable/disable the phy interrupts during lan78xx_link_status_change(). Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> --- drivers/net/phy/phy.c | 3 ++- include/linux/phy.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)