All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Mark Broadbent <markb@wetlettuce.com>
Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: [PATCH] Tulip interrupt uses non IRQ safe spinlock
Date: Fri, 27 May 2005 22:24:03 -0400	[thread overview]
Message-ID: <4297D643.5020407@pobox.com> (raw)
In-Reply-To: <E1DRFqC-00028H-Qi@tigger>

Mark Broadbent wrote:
> The interrupt handling code in the tulip network driver appears to use a non 
> IRQ safe spinlock in an interrupt context.  The following patch should correct 
> this.
> 
> Signed-off-by: Mark Broadbent <markb@wetlettuce.com>
> 
> Index: linux-2.6.11/drivers/net/tulip/interrupt.c
> ===================================================================
> --- linux-2.6.11.orig/drivers/net/tulip/interrupt.c	2005-03-07 18:11:23.000000000 +0000
> +++ linux-2.6.11/drivers/net/tulip/interrupt.c	2005-04-28 16:16:23.000000000 +0100
> @@ -567,8 +567,9 @@
>  
>  		if (csr5 & (TxNoBuf | TxDied | TxIntr | TimerInt)) {
>  			unsigned int dirty_tx;
> +			unsigned long flags;
>  
> -			spin_lock(&tp->lock);
> +			spin_lock_irqsave(&tp->lock, flags);
>  
>  			for (dirty_tx = tp->dirty_tx; tp->cur_tx - dirty_tx > 0;
>  				 dirty_tx++) {
> @@ -640,7 +641,7 @@
>  						   dev->name, csr5, ioread32(ioaddr + CSR6), tp->csr6);
>  				tulip_restart_rxtx(tp);
>  			}
> -			spin_unlock(&tp->lock);
> +			spin_unlock_irqrestore(&tp->lock, flags);

It's already inside the interrupt handler, so this patch is not needed.

	Jeff




      parent reply	other threads:[~2005-05-28  2:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-28 20:42 [PATCH] Tulip interrupt uses non IRQ safe spinlock Mark Broadbent
2005-04-28 21:26 ` Herbert Xu
2005-04-29 16:35   ` David S. Miller
2005-04-29 17:43     ` Sergey Vlasov
2005-05-02 12:56       ` Mark Broadbent
2005-05-02 21:28         ` Herbert Xu
     [not found]           ` <57556.192.102.214.6.1115108726.squirrel@webmail.wetlettuce.com>
2005-05-03  9:07             ` Herbert Xu
2005-04-29 18:44     ` Francois Romieu
2005-04-29 22:49     ` Herbert Xu
2005-05-02 12:57       ` Mark Broadbent
2005-05-02 21:31         ` Herbert Xu
     [not found]         ` <20050502124358.7186447f.davem@davemloft.net>
2005-05-02 21:32           ` Herbert Xu
2005-05-02 21:32             ` David S. Miller
2005-05-02 21:45               ` Herbert Xu
2005-04-30  0:37 ` Alan Cox
2005-04-30  1:02   ` Herbert Xu
2005-05-02 14:16 ` Paulo Marques
2005-05-28  2:24 ` Jeff Garzik [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=4297D643.5020407@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markb@wetlettuce.com \
    --cc=netdev@oss.sgi.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 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.