Skip to content

Commit c974bdb

Browse files
lunndavem330
authored andcommitted
net: phy: Use threaded IRQ, to allow IRQ from sleeping devices
The interrupt lines from PHYs maybe connected to I2C bus expanders, or from switches on MDIO busses. Such interrupts are sourced from devices which sleep, so use threaded interrupts. Threaded interrupts require that the interrupt requester also uses the threaded API. Change the phylib to use the threaded API, which is backwards compatible with none-threaded IRQs. Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dc30c35 commit c974bdb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/phy/phy.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -739,10 +739,10 @@ static int phy_disable_interrupts(struct phy_device *phydev)
739739
int phy_start_interrupts(struct phy_device *phydev)
740740
{
741741
atomic_set(&phydev->irq_disable, 0);
742-
if (request_irq(phydev->irq, phy_interrupt,
743-
IRQF_SHARED,
744-
"phy_interrupt",
745-
phydev) < 0) {
742+
if (request_threaded_irq(phydev->irq, NULL, phy_interrupt,
743+
IRQF_ONESHOT | IRQF_SHARED,
744+
"phy_interrupt",
745+
phydev) < 0) {
746746
pr_warn("%s: Can't get IRQ %d (PHY)\n",
747747
phydev->mdio.bus->name, phydev->irq);
748748
phydev->irq = PHY_POLL;

0 commit comments

Comments
 (0)