Commit c974bdbc authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

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: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dc30c35b
...@@ -739,10 +739,10 @@ static int phy_disable_interrupts(struct phy_device *phydev) ...@@ -739,10 +739,10 @@ static int phy_disable_interrupts(struct phy_device *phydev)
int phy_start_interrupts(struct phy_device *phydev) int phy_start_interrupts(struct phy_device *phydev)
{ {
atomic_set(&phydev->irq_disable, 0); atomic_set(&phydev->irq_disable, 0);
if (request_irq(phydev->irq, phy_interrupt, if (request_threaded_irq(phydev->irq, NULL, phy_interrupt,
IRQF_SHARED, IRQF_ONESHOT | IRQF_SHARED,
"phy_interrupt", "phy_interrupt",
phydev) < 0) { phydev) < 0) {
pr_warn("%s: Can't get IRQ %d (PHY)\n", pr_warn("%s: Can't get IRQ %d (PHY)\n",
phydev->mdio.bus->name, phydev->irq); phydev->mdio.bus->name, phydev->irq);
phydev->irq = PHY_POLL; phydev->irq = PHY_POLL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment