From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] net: allwinner: emac: Add missing free_irq
Date: Tue, 10 Dec 2013 18:52:05 +0100 [thread overview]
Message-ID: <20131210175205.GA3651@lukather> (raw)
In-Reply-To: <52A35361.8090608@cogentembedded.com>
Hi,
On Sat, Dec 07, 2013 at 08:57:05PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 07-12-2013 15:31, Maxime Ripard wrote:
>
> >The sun4i-emac driver uses devm_request_irq at .ndo_open time, but relies on
> >the managed device mechanism to actually free it. This causes an issue whenever
> >someone wants to restart the interface, the interrupt still being held, and not
> >yet released.
>
> >Fall back to using the regular request_irq at .ndo_open time, and introduce a
> >free_irq during .ndo_stop.
>
> >Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >---
> >Hi David,
>
> >It would be great if this patch would be applied to 3.13.
>
> >Thanks,
> >Maxime
>
>
> > drivers/net/ethernet/allwinner/sun4i-emac.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
>
> >diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
> >index 50b853a..38aba50 100644
> >--- a/drivers/net/ethernet/allwinner/sun4i-emac.c
> >+++ b/drivers/net/ethernet/allwinner/sun4i-emac.c
> >@@ -717,8 +717,8 @@ static int emac_open(struct net_device *dev)
> > if (netif_msg_ifup(db))
> > dev_dbg(db->dev, "enabling %s\n", dev->name);
> >
> >- if (devm_request_irq(db->dev, dev->irq, &emac_interrupt,
> >- 0, dev->name, dev))
> >+ if (request_irq(dev->irq, &emac_interrupt,
> >+ 0, dev->name, dev))
>
> Doesn't it fit into single line?
Hmmm, yes, probably.
I'll send a v2.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131210/5f75e001/attachment-0001.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Sergei Shtylyov
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] net: allwinner: emac: Add missing free_irq
Date: Tue, 10 Dec 2013 18:52:05 +0100 [thread overview]
Message-ID: <20131210175205.GA3651@lukather> (raw)
In-Reply-To: <52A35361.8090608-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1655 bytes --]
Hi,
On Sat, Dec 07, 2013 at 08:57:05PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 07-12-2013 15:31, Maxime Ripard wrote:
>
> >The sun4i-emac driver uses devm_request_irq at .ndo_open time, but relies on
> >the managed device mechanism to actually free it. This causes an issue whenever
> >someone wants to restart the interface, the interrupt still being held, and not
> >yet released.
>
> >Fall back to using the regular request_irq at .ndo_open time, and introduce a
> >free_irq during .ndo_stop.
>
> >Signed-off-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> >---
> >Hi David,
>
> >It would be great if this patch would be applied to 3.13.
>
> >Thanks,
> >Maxime
>
>
> > drivers/net/ethernet/allwinner/sun4i-emac.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
>
> >diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
> >index 50b853a..38aba50 100644
> >--- a/drivers/net/ethernet/allwinner/sun4i-emac.c
> >+++ b/drivers/net/ethernet/allwinner/sun4i-emac.c
> >@@ -717,8 +717,8 @@ static int emac_open(struct net_device *dev)
> > if (netif_msg_ifup(db))
> > dev_dbg(db->dev, "enabling %s\n", dev->name);
> >
> >- if (devm_request_irq(db->dev, dev->irq, &emac_interrupt,
> >- 0, dev->name, dev))
> >+ if (request_irq(dev->irq, &emac_interrupt,
> >+ 0, dev->name, dev))
>
> Doesn't it fit into single line?
Hmmm, yes, probably.
I'll send a v2.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-12-10 17:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-07 11:31 [PATCH] net: allwinner: emac: Add missing free_irq Maxime Ripard
2013-12-07 11:31 ` Maxime Ripard
2013-12-07 16:57 ` Sergei Shtylyov
2013-12-07 16:57 ` Sergei Shtylyov
2013-12-10 17:52 ` Maxime Ripard [this message]
2013-12-10 17:52 ` Maxime Ripard
-- strict thread matches above, loose matches on Subject: below --
2014-06-23 20:49 Maxime Ripard
2014-06-23 20:49 ` Maxime Ripard
2014-06-25 23:32 ` David Miller
2014-06-25 23:32 ` David Miller
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=20131210175205.GA3651@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.