Re: kernel BUG at drivers/mmc/core/sdio_io.c:28!

From: Ohad Ben-Cohen
Date: Wed Oct 27 2010 - 10:05:32 EST


Hi Elvis,

On Wed, Oct 27, 2010 at 3:24 PM, Elvis Dowson <elvis.dowson@xxxxxxx> wrote:
> root@beagleboard:/wlan# insmod sdio.ko
...
> root@beagleboard:/wlan# insmod tiwlan_drv.ko
...
> root@beagleboard:/wlan# ifconfig tiwlan0 up
> [  200.916687] TIWLAN: 2227.094325: pInitParams->RoamingScanning_2_4G_enable 0
> [  200.924530] dashboard20_wifi_power: 1
> [  200.943267] dashboard20_wifi_power: 0
> [  200.947937] dashboard20_wifi_power: 1
> [  201.020507] dashboard20_wifi_reset: 0
> [  201.024200] dashboard20_wifi_set_carddetect: 1
> [  201.029113] dashboard20_wifi_set_carddetect: Nobody to notify
> [  202.027465] tiwlan_sdio_probe not yet called
> [  202.031768] tiwlan_sdio_probe not yet called <---------------------------------------------
> [  202.036590] kernel BUG at drivers/mmc/core/sdio_io.c:28!
> [  202.041961] Unable to handle kernel NULL pointer dereference at virtual address 00000000


The BUG is most probably in the driver you are using, and not in the SDIO layer.

The driver is calling sdio_claim_host() without having a valid SDIO function.

Check out the 2 lines above the BUG message - you have a log there
complaining that your SDIO driver's probe function wasn't called.

You actually seem to have two problems here:
1. Your SDIO driver's probe function isn't called
2. Your WLAN driver is using the SDIO API without having a valid SDIO function

Ignoring the 2nd issue for now, you most probably have an integration
problem. Is the chip powered up correctly ? is it mmc rescanned after
it is powered up ? are you using the correct mmc controller ? have you
configured your mmc lines correctly (board muxing) ? etc..

Maybe you want to checkout the mainline wl1271 driver using Luca's
Beagle board patches :)

Regards,
Ohad.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/