public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Greg KH <gregkh@suse.de>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Chris Wright <chrisw@osdl.org>,
	bcm43xx-dev@lists.berlios.de
Subject: Re: Linux v2.6.17
Date: Sun, 18 Jun 2006 12:54:13 +0200	[thread overview]
Message-ID: <200606181254.13600.mb@bu3sch.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0606171856190.5498@g5.osdl.org>

On Sunday 18 June 2006 03:59, Linus Torvalds wrote:
> Not a lot of changes since the last -rc, the bulk is actually some 
> last-minute MIPS updates and s390 futex changes, the rest tend to be 
> various very small fixes that trickled in over the last week.

D'oh, please queue the following patch for -stable, Greg. ;)

--

Place the Init-vs-IRQ workaround before any card register
access, because we might not have the wireless core mapped
at all times in init. So this will result in a Machine Check
caused by a bus error.

Signed-off-by: Michael Buesch <mb@bu3sch.de>

Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c	2006-06-17 15:06:38.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c	2006-06-17 15:17:49.000000000 +0200
@@ -1885,6 +1885,15 @@
 
 	spin_lock(&bcm->irq_lock);
 
+	/* Only accept IRQs, if we are initialized properly.
+	 * This avoids an RX race while initializing.
+	 * We should probably not enable IRQs before we are initialized
+	 * completely, but some careful work is needed to fix this. I think it
+	 * is best to stay with this cheap workaround for now... .
+	 */
+	if (unlikely(bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED))
+		goto out;
+
 	reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON);
 	if (reason == 0xffffffff) {
 		/* irq not for us (shared irq) */
@@ -1906,19 +1915,11 @@
 
 	bcm43xx_interrupt_ack(bcm, reason);
 
-	/* Only accept IRQs, if we are initialized properly.
-	 * This avoids an RX race while initializing.
-	 * We should probably not enable IRQs before we are initialized
-	 * completely, but some careful work is needed to fix this. I think it
-	 * is best to stay with this cheap workaround for now... .
-	 */
-	if (likely(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED)) {
-		/* disable all IRQs. They are enabled again in the bottom half. */
-		bcm->irq_savedstate = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL);
-		/* save the reason code and call our bottom half. */
-		bcm->irq_reason = reason;
-		tasklet_schedule(&bcm->isr_tasklet);
-	}
+	/* disable all IRQs. They are enabled again in the bottom half. */
+	bcm->irq_savedstate = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL);
+	/* save the reason code and call our bottom half. */
+	bcm->irq_reason = reason;
+	tasklet_schedule(&bcm->isr_tasklet);
 
 out:
 	mmiowb();

-- 
Greetings Michael.

  parent reply	other threads:[~2006-06-18 10:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-18  1:59 Linux v2.6.17 Linus Torvalds
2006-06-18  2:06 ` Linus Torvalds
2006-06-18  3:30   ` Brice Goglin
2006-06-18  3:47     ` Linus Torvalds
2006-06-19  1:39       ` Petr Baudis
2006-06-18 13:49   ` Adrian Bunk
2006-06-18 16:44     ` Linus Torvalds
2006-06-19 21:25       ` Adrian Bunk
2006-06-19 14:23   ` Mark Lord
2006-06-18 10:54 ` Michael Buesch [this message]
2006-06-18 16:47   ` Andre Tomt
2006-06-18 17:05     ` Michael Buesch
2006-07-16 19:34 ` Linux v2.6.17 - PCI Bus hidden behind transparent bridge Julien Cristau
2006-07-17 14:13   ` Grant Grundler
2006-07-17 14:29     ` Julien Cristau
2006-07-17 15:31       ` Grant Grundler
2006-07-17 16:13         ` Julien Cristau
  -- strict thread matches above, loose matches on Subject: below --
2006-06-19  7:41 Linux v2.6.17 linux

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=200606181254.13600.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=chrisw@osdl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox