From: Andrew Lunn <andrew@lunn•ch>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
Cc: Florian Fainelli <f.fainelli@gmail•com>,
Vivien Didelot <vivien.didelot@savoirfairelinux•com>,
netdev <netdev@vger•kernel.org>
Subject: Re: [PATCH RFC 2/6] net: phy: Use threaded IRQ, to allow IRQ from sleeping devices
Date: Wed, 28 Sep 2016 14:24:56 +0200 [thread overview]
Message-ID: <20160928122456.GA22809@lunn.ch> (raw)
In-Reply-To: <b93c08b9-1ed0-19d4-bd77-53a4958da97e@cogentembedded.com>
On Wed, Sep 28, 2016 at 02:38:03PM +0300, Sergei Shtylyov wrote:
> Hello.
>
> On 9/28/2016 11:32 AM, Andrew Lunn wrote:
>
> >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>
> >---
> > drivers/net/phy/phy.c | 7 +++----
> > 1 file changed, 3 insertions(+), 4 deletions(-)
> >
> >diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> >index c6f66832a1a6..5c29ed72f721 100644
> >--- a/drivers/net/phy/phy.c
> >+++ b/drivers/net/phy/phy.c
> >@@ -722,10 +722,9 @@ 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, "phy_interrupt",
>
> What about IRQF_SHARED?
I will check if you can have a shared oneshot.
Andrew
next prev parent reply other threads:[~2016-09-28 12:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1475051544-18561-1-git-send-email-andrew@lunn.ch>
2016-09-28 8:32 ` [PATCH RFC 1/6] net: dsa: mv88e6xxx: Implement interrupt support Andrew Lunn
2016-09-28 10:22 ` Andrew Lunn
2016-09-28 8:32 ` [PATCH RFC 2/6] net: phy: Use threaded IRQ, to allow IRQ from sleeping devices Andrew Lunn
2016-09-28 11:38 ` Sergei Shtylyov
2016-09-28 12:24 ` Andrew Lunn [this message]
2016-09-28 21:16 ` Andrew Lunn
2016-09-28 8:32 ` [PATCH RFC 3/6] net: phy: Threaded interrupts allow some simplification Andrew Lunn
2016-09-28 11:46 ` Sergei Shtylyov
2016-09-28 12:13 ` Sergei Shtylyov
2016-09-28 12:28 ` Andrew Lunn
2016-09-28 13:38 ` Sergei Shtylyov
2016-09-28 17:14 ` Florian Fainelli
2016-10-18 10:37 ` Sergei Shtylyov
2016-10-18 10:46 ` Andrew Lunn
2016-09-28 8:32 ` [PATCH RFC 4/6] net: phy: Use phy name when requesting the interrupt Andrew Lunn
2016-09-28 17:18 ` Florian Fainelli
2016-09-28 8:32 ` [PATCH RFC 5/6] net: phy: Trigger state machine on state change and not polling Andrew Lunn
2016-09-28 21:31 ` Florian Fainelli
2016-09-29 7:08 ` Andrew Lunn
2016-09-28 8:32 ` [PATCH RFC 6/6] arm: vf610: zii devel b: Add support for switch interrupts Andrew Lunn
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=20160928122456.GA22809@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=f.fainelli@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sergei.shtylyov@cogentembedded$(echo .)com \
--cc=vivien.didelot@savoirfairelinux$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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