Re: b43 sdio: WARNING: at drivers/mmc/core/core.c:237 mmc_wait_for_cmd

Larry Finger
2010-10-28T14:49:28Z

On 10/28/2010 09:28 AM, Arnd Hannemann wrote:
> Hi,
\> [ 1364.620044] b43-phy1 debug: Removing Interface type 2
> [ 1364.621812] b43-phy1 debug: Wireless interface stopped
> [ 1372.440297] b43-sdio: before ssb_bus_unregister, claimed is 0
> [ 1372.440345] b43-sdio: before sdio_disable_func, claimed is 0
> [ 1372.440351] ------------[ cut here ]------------
> [ 1372.440367] WARNING: at drivers/mmc/core/core.c:237 mmc_wait_for_cmd+0x88/0x90()

Please try the patch below. It claims the device before the sdio_disable_func(()
call and releases it afterwords.

Larry

Index: wireless-testing/drivers/net/wireless/b43/sdio.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/sdio.c
+++ wireless-testing/drivers/net/wireless/b43/sdio.c
@@ -175,7 +175,9 @@ static void b43_sdio_remove(struct sdio_
struct b43_sdio *sdio = sdio_get_drvdata(func);

ssb_bus_unregister(&sdio->ssb);
+ sdio_claim_host(func);
sdio_disable_func(func);
+ sdio_release_host(func);
kfree(sdio);
sdio_set_drvdata(func, NULL);
}