From patchwork Fri Sep 11 21:04:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Buesch X-Patchwork-Id: 47004 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8BL61YP016172 for ; Fri, 11 Sep 2009 21:06:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756701AbZIKVFi (ORCPT ); Fri, 11 Sep 2009 17:05:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755405AbZIKVFh (ORCPT ); Fri, 11 Sep 2009 17:05:37 -0400 Received: from bu3sch.de ([62.75.166.246]:37740 "EHLO vs166246.vserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756724AbZIKVFg (ORCPT ); Fri, 11 Sep 2009 17:05:36 -0400 Received: by vs166246.vserver.de with esmtpa (Exim 4.69) id 1MmDJJ-0005je-Qy; Fri, 11 Sep 2009 21:05:37 +0000 From: Michael Buesch To: "John W. Linville" Subject: [PATCH] b43: Fix IRQ sync for SDIO Date: Fri, 11 Sep 2009 23:04:04 +0200 User-Agent: KMail/1.9.9 Cc: Broadcom Wireless , "linux-wireless" , Albert Herranz MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200909112304.04810.mb@bu3sch.de> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org synchronize_irq is meaningless for SDIO. sdio_release_irq will sync the IRQ thread for us. Signed-off-by: Michael Buesch Index: wireless-testing/drivers/net/wireless/b43/main.c =================================================================== --- wireless-testing.orig/drivers/net/wireless/b43/main.c 2009-09-11 22:50:17.000000000 +0200 +++ wireless-testing/drivers/net/wireless/b43/main.c 2009-09-11 22:52:25.000000000 +0200 @@ -3854,10 +3854,15 @@ redo: b43_read32(dev, B43_MMIO_GEN_IRQ_MASK); /* Flush */ spin_unlock_irq(&wl->hardirq_lock); } - /* Synchronize the interrupt handlers. Unlock to avoid deadlocks. */ + /* Synchronize and free the interrupt handlers. Unlock to avoid deadlocks. */ orig_dev = dev; mutex_unlock(&wl->mutex); - synchronize_irq(dev->dev->irq); + if (dev->dev->bus->bustype == SSB_BUSTYPE_SDIO) { + b43_sdio_free_irq(dev); + } else { + synchronize_irq(dev->dev->irq); + free_irq(dev->dev->irq, dev); + } mutex_lock(&wl->mutex); dev = wl->current_dev; if (!dev) @@ -3874,10 +3879,6 @@ redo: dev_kfree_skb(skb_dequeue(&wl->tx_queue)); b43_mac_suspend(dev); - if (dev->dev->bus->bustype == SSB_BUSTYPE_SDIO) - b43_sdio_free_irq(dev); - else - free_irq(dev->dev->irq, dev); b43_leds_exit(dev); b43dbg(wl, "Wireless interface stopped\n");