summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-10-16 19:56:50 +0200
committerDavid S. Miller <davem@davemloft.net>2016-10-17 11:18:08 -0400
commitc974bdbc3e7734e72d6347afc49f806342578e75 (patch)
treea51ba5afda0add0e6786aac22fa6b839895a8c09 /drivers/net/phy/phy.c
parentdc30c35be720aa7c62bd9fa4d506be2d686e9165 (diff)
downloadop-kernel-dev-c974bdbc3e7734e72d6347afc49f806342578e75.zip
op-kernel-dev-c974bdbc3e7734e72d6347afc49f806342578e75.tar.gz
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 <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index f424b86..25f2b29 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -739,10 +739,10 @@ phy_err:
int phy_start_interrupts(struct phy_device *phydev)
{
atomic_set(&phydev->irq_disable, 0);
- if (request_irq(phydev->irq, phy_interrupt,
- IRQF_SHARED,
- "phy_interrupt",
- phydev) < 0) {
+ if (request_threaded_irq(phydev->irq, NULL, phy_interrupt,
+ IRQF_ONESHOT | IRQF_SHARED,
+ "phy_interrupt",
+ phydev) < 0) {
pr_warn("%s: Can't get IRQ %d (PHY)\n",
phydev->mdio.bus->name, phydev->irq);
phydev->irq = PHY_POLL;
OpenPOWER on IntegriCloud