From: Andrew Lunn <andrew@lunn.ch>
To: netdev <netdev@vger.kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Jason Cooper <jason@lakedaemon.net>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Subject: [RFC PATCH 8/8] net: phy: Use threaded IRQ, to allow IRQ from sleeping devices
Date: Mon, 14 Mar 2016 01:33:51 +0100 [thread overview]
Message-ID: <1457915631-16696-9-git-send-email-andrew@lunn.ch> (raw)
In-Reply-To: <1457915631-16696-1-git-send-email-andrew@lunn.ch>
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 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>
---
drivers/net/phy/phy.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 5590b9c182c9..54a623c93e49 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -641,8 +641,9 @@ phy_err:
int phy_start_interrupts(struct phy_device *phydev)
{
atomic_set(&phydev->irq_disable, 0);
- if (request_irq(phydev->irq, phy_interrupt, 0, "phy_interrupt",
- phydev) < 0) {
+ if (request_threaded_irq(phydev->irq, NULL, phy_interrupt,
+ IRQF_ONESHOT, "phy_interrupt",
+ phydev) < 0) {
pr_warn("%s: Can't get IRQ %d (PHY)\n",
phydev->mdio.bus->name, phydev->irq);
phydev->irq = PHY_POLL;
--
2.7.0
prev parent reply other threads:[~2016-03-14 0:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 0:33 [RFC PATCH 0/8] Add irq controller support to Marvell switches Andrew Lunn
2016-03-14 0:33 ` [RFC PATCH 1/8] net: dsa: Add parsing of an interrupt property Andrew Lunn
2016-03-14 0:33 ` [RFC PATCH 2/8] dsa: mv88e6xxx: Add support for switch and device interrupts Andrew Lunn
2016-03-14 0:33 ` [RFC PATCH 3/8] dsa: mv88e6352: Wire up the mv88e6xxx interrupt code Andrew Lunn
2016-03-14 0:33 ` [RFC PATCH 4/8] dsa: mv88e6171: " Andrew Lunn
2016-03-14 0:33 ` [RFC PATCH 5/8] dsa: mv88e6123_61_65: " Andrew Lunn
2016-03-14 0:33 ` [RFC PATCH 6/8] dsa: mv88e6131: " Andrew Lunn
2016-03-14 0:33 ` [RFC PATCH 7/8] net: dsa: Support phy interrupt property for switch ports Andrew Lunn
2016-03-14 0:33 ` Andrew Lunn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457915631-16696-9-git-send-email-andrew@lunn.ch \
--to=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=jason@lakedaemon.net \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).