From: Greg Ungerer <gerg@snapgear.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-rt-users@vger.kernel.org,
Ben Hutchings <ben@decadent.org.uk>,
Patrick McHardy <kaber@trash.net>,
Sascha Hauer <s.hauer@pengutronix.de>,
Matt Waddel <Matt.Waddel@freescale.com>,
netdev@vger.kernel.org,
Tim Sander <tim01@vlsi.informatik.tu-darmstadt.de>
Subject: Re: [PATCH 2/2] fec: don't enable irqs in hard irq context
Date: Thu, 03 Sep 2009 11:14:24 +1000 [thread overview]
Message-ID: <4A9F1870.7070408@snapgear.com> (raw)
In-Reply-To: <1251882856-23549-2-git-send-email-u.kleine-koenig@pengutronix.de>
Hi Uwe,
Uwe Kleine-König wrote:
> fec_enet_mii, fec_enet_rx and fec_enet_tx are both only called by
> fec_enet_interrupt in interrupt context. So they must not use
> spin_lock_irq/spin_unlock_irq.
>
> This fixes:
> WARNING: at kernel/lockdep.c:2140 trace_hardirqs_on_caller+0x130/0x194()
> ...
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Greg Ungerer <gerg@uclinux.org>
Looks good.
Acked-by: Greg Ungerer <gerg@uclinux.org>
> Cc: Ben Hutchings <ben@decadent.org.uk>
> Cc: Patrick McHardy <kaber@trash.net>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Matt Waddel <Matt.Waddel@freescale.com>
> Cc: netdev@vger.kernel.org
> Cc: Tim Sander <tim01@vlsi.informatik.tu-darmstadt.de>
> ---
> drivers/net/fec.c | 12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/fec.c b/drivers/net/fec.c
> index ef82606..9c49d56 100644
> --- a/drivers/net/fec.c
> +++ b/drivers/net/fec.c
> @@ -427,7 +427,7 @@ fec_enet_tx(struct net_device *dev)
> struct sk_buff *skb;
>
> fep = netdev_priv(dev);
> - spin_lock_irq(&fep->hw_lock);
> + spin_lock(&fep->hw_lock);
> bdp = fep->dirty_tx;
>
> while (((status = bdp->cbd_sc) & BD_ENET_TX_READY) == 0) {
> @@ -486,7 +486,7 @@ fec_enet_tx(struct net_device *dev)
> }
> }
> fep->dirty_tx = bdp;
> - spin_unlock_irq(&fep->hw_lock);
> + spin_unlock(&fep->hw_lock);
> }
>
>
> @@ -509,7 +509,7 @@ fec_enet_rx(struct net_device *dev)
> flush_cache_all();
> #endif
>
> - spin_lock_irq(&fep->hw_lock);
> + spin_lock(&fep->hw_lock);
>
> /* First, grab all of the stats for the incoming packet.
> * These get messed up if we get called due to a busy condition.
> @@ -604,7 +604,7 @@ rx_processing_done:
> }
> fep->cur_rx = bdp;
>
> - spin_unlock_irq(&fep->hw_lock);
> + spin_unlock(&fep->hw_lock);
> }
>
> /* called from interrupt context */
> @@ -615,7 +615,7 @@ fec_enet_mii(struct net_device *dev)
> mii_list_t *mip;
>
> fep = netdev_priv(dev);
> - spin_lock_irq(&fep->mii_lock);
> + spin_lock(&fep->mii_lock);
>
> if ((mip = mii_head) == NULL) {
> printk("MII and no head!\n");
> @@ -633,7 +633,7 @@ fec_enet_mii(struct net_device *dev)
> writel(mip->mii_regval, fep->hwp + FEC_MII_DATA);
>
> unlock:
> - spin_unlock_irq(&fep->mii_lock);
> + spin_unlock(&fep->mii_lock);
> }
>
> static int
--
-----------------------------------------------------------------------
next prev parent reply other threads:[~2009-09-03 1:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-31 9:43 Latest PreemptRT patch error on imx35 Tim Sander
2009-08-31 11:48 ` Carsten Emde
2009-08-31 13:40 ` Tim Sander
2009-08-31 13:22 ` Uwe Kleine-König
2009-08-31 15:29 ` Tim Sander
2009-08-31 16:37 ` [PATCH] " Tim Sander
2009-09-02 9:14 ` [PATCH 1/2] fec: fix recursive locking of mii_lock Uwe Kleine-König
2009-09-02 9:14 ` [PATCH 2/2] fec: don't enable irqs in hard irq context Uwe Kleine-König
2009-09-03 1:14 ` Greg Ungerer [this message]
2009-09-03 6:17 ` David Miller
2009-09-07 14:01 ` Uwe Kleine-König
2009-09-03 1:16 ` [PATCH 1/2] fec: fix recursive locking of mii_lock Greg Ungerer
2009-09-03 6:17 ` 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=4A9F1870.7070408@snapgear.com \
--to=gerg@snapgear.com \
--cc=Matt.Waddel@freescale.com \
--cc=ben@decadent.org.uk \
--cc=kaber@trash.net \
--cc=linux-rt-users@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=tim01@vlsi.informatik.tu-darmstadt.de \
--cc=u.kleine-koenig@pengutronix.de \
/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.