From: Chris Wright Date: Tue, 20 Jun 2006 22:52:29 +0000 (-0700) Subject: Add bcm43xx init fix from Michael Buesch X-Git-Tag: v2.6.16.22~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bf41dcc7ac72a2a4e864fbb908036c5e313fa7f;p=thirdparty%2Fkernel%2Fstable-queue.git Add bcm43xx init fix from Michael Buesch --- diff --git a/queue-2.6.17/bcm43xx-init-fix-for-possible-machine-check.patch b/queue-2.6.17/bcm43xx-init-fix-for-possible-machine-check.patch new file mode 100644 index 00000000000..962ae675e09 --- /dev/null +++ b/queue-2.6.17/bcm43xx-init-fix-for-possible-machine-check.patch @@ -0,0 +1,64 @@ +From mb@bu3sch.de Sun Jun 18 10:09:06 2006 +Date: Sun, 18 Jun 2006 19:05:10 +0200 +From: Michael Buesch +To: Greg KH +Cc: Andre Tomt , Linus Torvalds , Linux Kernel Mailing List , Chris Wright , bcm43xx-dev@lists.berlios.de +Subject: bcm43xx: init fix for possible Machine Check + +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 +Signed-off-by: Chris Wright +--- + +--- + drivers/net/wireless/bcm43xx/bcm43xx_main.c | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +--- linux-2.6.17.1.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c ++++ linux-2.6.17.1/drivers/net/wireless/bcm43xx/bcm43xx_main.c +@@ -1870,6 +1870,15 @@ static irqreturn_t bcm43xx_interrupt_han + + spin_lock(&bcm->_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(!bcm->initialized)) ++ goto out; ++ + reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); + if (reason == 0xffffffff) { + /* irq not for us (shared irq) */ +@@ -1891,20 +1900,11 @@ static irqreturn_t bcm43xx_interrupt_han + + 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(bcm->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(); + spin_unlock(&bcm->_lock); diff --git a/queue-2.6.17/series b/queue-2.6.17/series index c7a2e5f784d..9563fb65991 100644 --- a/queue-2.6.17/series +++ b/queue-2.6.17/series @@ -11,3 +11,4 @@ ethtool-fix-ufo-typo.patch sparc32-fix-iommu_flush_iotlb-end-address.patch ntfs-critical-bug-fix.patch x86-compile-fix-for-asm-i386-alternatives.h.patch +bcm43xx-init-fix-for-possible-machine-check.patch