iMX31 and 88W8686 SDIO module

claud_yu claud_yu at yahoo.com.tw
Mon Apr 28 07:44:25 EDT 2008


hi all , 

Today I trace the moblin and libertas driver and compare the different of negotiation of firmware and driver. And I got result and log below. The libertas driver get first error after firmware download and issue first command CMD_GET_HW_SPCE. 

The following log from moblin 88w8686 driver.
---------------------
Enter: sbi_host_to_card, drivers/net/wireless/8686_v9/if/if_sdio/if_sdio.c:1234
PREP_CMD: Wait for CMD response...
Leave: sbi_host_to_card, drivers/net/wireless/8686_v9/if/if_sdio/if_sdio.c:1291
DNLD_CMD: 0x3, act 0x0, len 46, seqno 2 @ 4294947259
DNLD_CMD:
*
03 00 2e 00 02 00 00 00 00 00 00 00 00 00 00 00
ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
*
00 00 00 00 00 00 00 00 00 00 00 00 00 00
Leave: DownloadCommandToStation, drivers/net/wireless/8686_v9/wlan/wlan_cmd.c:1483
Leave: ExecuteNextCommand, drivers/net/wireless/8686_v9/wlan/wlan_cmd.c:2296
*
sdio_ireg = 0x2
INT: status = 0x2
main-thread sleeping... HS_Act=N WakeupReq=N Conn=N PS_Mode=0 PS_State=0
*
main-thread waking up: IntCnt=1 CurCmd=Y CmdPending=N
                       Connect=N CurTxSkb=N dnld_sent=0
*
sdio_ireg = 0x1
CARD_OCR_0_REG = 0x32, CARD_OCR_1_REG = 0x0
INT: status = 0x12
Enter: wlan_process_rx_command, drivers/net/wireless/8686_v9/wlan/wlan_cmdresp.c:946
CMD_RESP:
03 80 2e 00 02 00 00 00 02 00 11 00 08 00 40 00
00 19 88 05 39 58 40 00 01 00 03 46 09 12 00 00
00 00 00 00 00 00 00 00 00 00 03 03 00 00
CMD_RESP: 0x8003, result 0, len 46, seqno 2 @ 4294947267
Enter: wlan_ret_get_hw_spec, drivers/net/wireless/8686_v9/wlan/wlan_cmdresp.c:229
GET_HW_SPEC: FWReleaseVersion- 0x12094603
GET_HW_SPEC: Permanent addr-  0:19:88: 5:39:58
GET_HW_SPEC: HWIfVersion=0x2  Version=0x11
---------------------

And the following log from linux 2.6.24 libertas driver.
---------------------
libertas host: QUEUE_CMD: inserted command 0x0003 into cmdpendingq
libertas leave: libertas_queue_cmd():961
libertas thread: main-thread 222 (waking up): intcounter=0 currenttxskb=00000000 dnld_sent=0
libertas thread: main-thread 333: intcounter=0 currenttxskb=00000000 dnld_sent=0
libertas thread: main-thread 444: intcounter=0 currenttxskb=00000000 dnld_sent=0
libertas enter: libertas_execute_next_command():1647
libertas host: EXEC_NEXT_CMD: sending command 0x0003
libertas enter: DownloadcommandToStation():981
libertas host: DNLD_CMD: command 0x0003, size 46, jiffies 4294945431
libertas DNLD_CMD: 03 00 2e 00 02 00 00 00 00 00 00 00 00 00 00 00
libertas DNLD_CMD: ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00
libertas DNLD_CMD: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
libertas enter: if_sdio_host_to_card(type 1, bytes 46):708
libertas enter: if_sdio_host_to_card_worker():361
libertas leave: if_sdio_host_to_card():776, ret 0
libertas cmd: DNLD_CMD: sent command 0x0003, jiffies 4294945435
libertas leave: DownloadcommandToStation():1037, ret 0
libertas leave: libertas_execute_next_command():1780
libertas leave: if_sdio_host_to_card_worker():401
libertas enter: if_sdio_interrupt():822
libertas thread: interrupt: 0x2
libertas leave: if_sdio_interrupt():856, ret 0
libertas thread: main-thread 111: intcounter=0 currenttxskb=00000000 dnld_sent=0
libertas thread: main-thread sleeping... Conn=1 IntC=0 PS_mode=0 PS_State=0
libertas enter: if_sdio_interrupt():822
libertas thread: interrupt: 0x1
libertas host: PREP_CMD: wait for response
libertas enter: if_sdio_card_to_host():258
libertas thread: packet size (50 bytes) from firmware
libertas CARD_BUF: 00 00 01 00 03 80 2e 00 02 00 00 00 02 00 11 00
libertas CARD_BUF: 08 00 40 00 00 19 88 05 39 58 40 00 01 00 03 46
libertas CARD_BUF: 09 12 00 00 00 00 00 00 00 00 00 00 00 00 03 03
libertas CARD_BUF: 00 00
libertas thread: packet of type 1 and size 0 bytes
libertas thread: packet fragment (0 < 50)
libertas enter: if_sdio_handle_cmd():135
libertas thread: response packet too large (-4 bytes)
libertas leave: if_sdio_handle_cmd():164, ret -7
libertas: problem fetching packet from firmware
libertas leave: if_sdio_card_to_host():347, ret -7
libertas leave: if_sdio_interrupt():856, ret -7
---------------------

The command packet cmd 0x0003 and size are the same. 
But the response of driver are different. 
The libertas driver show 4 byte shift compare to moblin driver. 
First the return value  of scratch register are the same (50).
And I review the I/O code of function of two drivers. 
The moblin driver issue 1 block 512 bytes to read command response.
And the libertas driver issue 1 block 50 bytes to read command respone.
Maybe I should review the iMX31 MMC I/O routine next.

Claud Yu 



      _________________________________________________________________________________________________________
生活有問題?問大家,不如找知識 +,還可抽 MacBook Air http://ksk.search.yahoo.net/index.asp?WT.mc_id=023



More information about the libertas-dev mailing list