libertas sdio on bf548 w/ uclinux

Nick Moszer nick.moszer at packetdigital.com
Tue Apr 22 14:04:52 EDT 2008


As a follow up to this, here is the libertas debug info right before it 
bombs.

.......
libertas thread: sending 512 bytes (512 bytes) 
chunk                           
libertas thread: firmware wants 16 
bytes                                       
libertas thread: sending 16 bytes (32 bytes) 
chunk                             
libertas thread: firmware wants 512 
bytes                                      
libertas thread: sending 512 bytes (512 bytes) 
chunk                           
libertas thread: firmware wants 16 
bytes                                       
libertas thread: sending 16 bytes (32 bytes) 
chunk                             
libertas thread: firmware wants 512 
bytes                                      
libertas thread: sending 512 bytes (512 bytes) 
chunk                           
libertas thread: firmware wants 16 
bytes                                       
libertas thread: sending 16 bytes (32 bytes) 
chunk                             
libertas thread: firmware wants 512 
bytes                                      
libertas thread: sending 512 bytes (512 bytes) 
chunk                           
libertas thread: firmware wants 16 
bytes                                       
libertas thread: sending 16 bytes (32 bytes) 
chunk                             
libertas thread: firmware wants 512 
bytes                                      
libertas thread: sending 512 bytes (512 bytes) 
chunk                           
libertas thread: firmware wants 16 
bytes                                       
libertas thread: sending 16 bytes (32 bytes) 
chunk                             
libertas thread: firmware wants 96 
bytes                                       
libertas thread: sending 96 bytes (96 bytes) 
chunk                             
libertas thread: firmware wants 16 
bytes                                       
libertas thread: sending 16 bytes (32 bytes) 
chunk                             
libertas thread: waiting for firmware to 
boot...                               
libertas leave: if_sdio_prog_real():689, ret 
0                                 
libertas leave: if_sdio_prog_firmware():725, ret 
0                             
libertas enter: 
libertas_allocate_cmd_buffer():1460                            
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas leave: libertas_allocate_cmd_buffer():1493, ret 
0                     
libertas enter: 
libertas_start_card():1255                                     
libertas enter: 
wlan_setup_firmware():930                                      
libertas enter: 
libertas_prepare_and_send_command():1137                       
libertas enter: 
libertas_get_free_cmd_ctrl_node():1553                         
libertas enter: 
cleanup_cmdnode():1585                                         
libertas leave: 
cleanup_cmdnode():1599                                         
libertas leave: 
libertas_get_free_cmd_ctrl_node():1573                         
libertas enter: 
libertas_set_cmd_ctrl_node():1616                              
libertas leave: 
libertas_set_cmd_ctrl_node():1625                              
libertas host: PREP_CMD: command 
0x0003                                        
libertas enter: 
wlan_cmd_hw_spec():44                                          
libertas leave: 
wlan_cmd_hw_spec():50                                          
libertas enter: 
libertas_queue_cmd():924                                       
libertas host: QUEUE_CMD: inserted command 0x0003 into 
cmdpendingq             
libertas leave: 
libertas_queue_cmd():961                                       
libertas host: PREP_CMD: wait for 
response                                     
libertas host: EXEC_NEXT_CMD: sending command 
0x0003                           
libertas enter: 
DownloadcommandToStation():981                                 
libertas host: DNLD_CMD: command 0x0003, size 46, jiffies 
4294908268           
libertas enter: if_sdio_host_to_card(type 1, bytes 
46):742                     
libertas leave: if_sdio_host_to_card():831, ret 
0                              
libertas cmd: DNLD_CMD: sent command 0x0003, jiffies 
4294908271                
libertas leave: DownloadcommandToStation():1037, ret 
0                         
libertas enter: 
if_sdio_host_to_card_worker():390                              
BUG: failure at 
drivers/mmc/host/bfin_sdh.c:122/sdh_setup_data()!              
Kernel panic - not syncing: BUG! 

So it appears it is getting past the full firmware load. 


Nick Moszer wrote:
> The scripts seem to solve that problem.  Thanks!
> I was wondering if you guys know what is typical for block sizes when 
> loading the firmware. 
> I am able to load the helper firmware just fine, once I get to the main 
> firmware a little debug shows:
>
> (a whole mess of alternating 1, 16 block numbers like below)          
> 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:52
>
> Then the oddball at the end.  It was 50 until I added the "round to a 
> multiple of 4" code in if_sdio.c. 
> My host controller driver does not like anything that isn't a power of 2.  
> Meaning they wrote the driver on this blackfin so that anything not a 
> power of 2 will call BUG_ON and cause a panic. 
>
> Is this normal behavior for the block size to change when loading like 
> that? 
>
> Thanks!
>
>
> Dan Williams wrote:
>   
>> On Mon, 2008-04-14 at 22:17 +0200, Julien Boibessot wrote:
>>   
>>     
>>> Dan Williams a écrit :
>>>     
>>>       
>>>> That's all handled by udev these days on most systems, unfortunately I'm
>>>> not so up-to-date on the details of udev.  Might be best to ask around
>>>> the udev lists.  Do you have any other drivers in your kernel that use
>>>> request_firmware(), and do they work?
>>>>   
>>>>       
>>>>         
>>> On my ARM9 system, with a Buildroot made Rootfs (without udev), 
>>> following script is working to load helper firmware (save it as 
>>> /sbin/hotplug):
>>>
>>> #!/bin/sh
>>> if [ "$FIRMWARE" != "" ]; then
>>>         HOTPLUG_FW_DIR=/lib/firmware/
>>>         echo 1 > /sys/$DEVPATH/loading
>>>         cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data
>>>         echo 0 > /sys/$DEVPATH/loading
>>> fi
>>>
>>>
>>> If it can help...
>>>     
>>>       
>> Most likely yes, since there are cases where you don't want the
>> complexity that udev drags along :)
>>
>> Thanks,
>> Dan
>>
>>
>>
>> _______________________________________________
>> libertas-dev mailing list
>> libertas-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/libertas-dev
>>   
>>     
>
>
>
>
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev
>   


-- 

* 
Nick Moszer
Research Engineer
Packet Digital, LLC
201 N 5th Street, Suite 1500
Fargo, ND 58102
701.365.4392


This message may contain confidential and privileged information.  It is
intended only for the use of the addressee, or any authorized agent of
the addressee. Any unauthorized use, distribution or copying of this
information is strictly prohibited and may be unlawful. If you have
received this communication in error, please notify the sender by
replying immediately and destroy the original message and all
attachments from your electronic files.*




More information about the libertas-dev mailing list