2008-04-21 14:40:45 SDIO Wifi Mess
Nick Moszer (UNITED STATES)
Message: 54636 Hello,
I'm working on getting a 88W8686 Marvell SDIO Wifi card to play nice on a BF548-EZKIT. I've run into a potential bug in the SDH driver for the bfin and thought if you guys could make heads of tails of it.
After loading the libertas module then the libertas_sdio module then loading the firmware onto the card, There is about a half second pause and the console spits:
BUG: failure at drivers/mmc/host/bfin_sdh.c:121/sdh_setup_data()!
Kernel panic - not syncing: BUG!
The most I can manage out of dmesg right before this happens is: (i've got mmc debug off and libertas debug on)
libertas enter: libertas_init_module():1515
libertas leave: libertas_init_module():1517
libertas enter: if_sdio_init_module():1126
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
libertas enter: if_sdio_probe():919
libertas thread: class = 0x7, vendor = 0x2DF, device = 0x9103, model = 0xB, iopo rt = 0x10000
libertas enter: if_sdio_prog_firmware():695
libertas enter: if_sdio_prog_helper():447
libertas thread: sending 60 bytes chunk
....(about 30 of these "sending 60 bytes chunk")
libertas thread: sending 60 bytes chunk
libertas thread: sending 56 bytes chunk
libertas thread: waiting for helper to boot...
libertas leave: if_sdio_prog_helper():549, ret 0
libertas enter: if_sdio_prog_real():565
This same behavior occurs with mmc debug off and libertas debug off.
Looking through bfin_sdh.c.. well.. anyone have any thoughts on where to go with this?
Thanks!
QuoteReplyEditDelete
2008-04-21 14:55:07 Re: SDIO Wifi Mess
Nick Moszer (UNITED STATES)
Message: 54637 Sorry, forgot to mention:
I'm using a svn kernel, 2.6.24.4-ADI-2008R2-pre-svn to be exact. This is in a 2008R1-RC8 distribution.
The libertas driver is from the kernel with no modifications.
QuoteReplyEditDelete
2008-04-21 18:16:41 Re: SDIO Wifi Mess
Nick Moszer (UNITED STATES)
Message: 54656 After digging into this more, I changed the sdh_setup_data() function in bfin_sdh.c as follows:
// pr_debug("%s enter flags:0x%x\n", __FUNCTION__, data->flags);
printk("%s enter flags:0x%x numblocks:%d blksize:%d\n", __FUNCTION__, data->flags, data->blocks, data->blksz );
The output from this shows:
...(a bunch of these before this)
sdh_setup_data enter flags:0x100 numblocks:16 blksize:32
sdh_setup_data enter flags:0x100 numblocks:1 blksize:32
sdh_setup_data enter flags:0x100 numblocks:16 blksize:32
sdh_setup_data enter flags:0x100 numblocks:1 blksize:32
sdh_setup_data enter flags:0x100 numblocks:16 blksize:32
sdh_setup_data enter flags:0x100 numblocks:1 blksize:32
sdh_setup_data enter flags:0x100 numblocks:3 blksize:32
sdh_setup_data enter flags:0x100 numblocks:1 blksize:32
sdh_setup_data enter flags:0x100 numblocks:1 blksize:50
BUG: failure at drivers/mmc/host/bfin_sdh.c:122/sdh_setup_data()!
Kernel panic - not syncing: BUG!
I read something in the libertas driver about SDH controllers puking on data chunks that aren't a multiple of 4.
Could this be the case here?
QuoteReplyEditDelete
2008-04-21 19:57:46 Re: SDIO Wifi Mess
Nick Moszer (UNITED STATES)
Message: 54657 Sorry about the numerous posts here..
The bug it's throwing, let me see if I've got this right. It's saying you can only have block sizes that are a power of 2?
from sdh_setup_data() in bfin_sdh.c:121
BUG_ON(data->blksz & (data->blksz -1));
Adding padding code to the libertas driver to make transfers a multiple of 4 doesn't seem to help as the size would be 52 and not 64.