Comment 3 for bug 918643

Revision history for this message
Amit Pundir (pundiramit) wrote : Re: snowball: wlan module fails to power up wlan chip sometimes

Steps to reproduce this error on Android from command line. First two steps are already a part of linaro-android boot process. So you don't need to run them explicitly.

1. Insert mac80211 and cw1200_core modules.
root@android:/ # insmod /system/modules/mac80211.ko
root@android:/ # insmod /system/modules/cw1200_core.ko

2. Run hciattach:
root@android:/ # hciattach -a 23 -n -s 115200 /dev/ttyAMA0 cg2900 115200 flow &

/*
 * Following are the "hciattach" logs, observed frequently on Android.
 */

Success:
root@android:/ # hciattach -a 23 -n -s 115200 /dev/ttyAMA0 cg2900 115200 flow &
[ 23.694732] cg2900-uart cg2900-uart.0: UART opened
[ 23.712585] cg2900-uart cg2900-uart.0: Transport connected
[ 23.725860] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
Device setup complete
[ 23.989562] cg2900-uart cg2900-uart.0: Received Read Local Version Information with:
[ 23.989562] hci_version: 0x06
[ 23.989562] hci_revision: 0x0200
[ 23.989562] lmp_pal_version: 0x06
[ 23.989562] manufacturer: 0x0030
[ 23.989593] hci_sub_version: 0x0000
[ 24.014526] cg2900-uart cg2900-uart.0: Chip supported by the CG2900 chip driver
[ 24.022949] cg2900-uart cg2900-uart.0: Chip handler found
[ 24.518737] cg2900-uart cg2900-uart.0: Set chip power: DISABLE
[ 24.527343] Bluetooth: CG2900 registered
[ 24.531433] Bluetooth: Open ST-Ericsson CG2900 driver
[ 24.536560] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
[ 24.540679] cg2900-audiobt cg2900-audiobt.0: CG2900 device added
[ 24.543365] cg2900-audiofm cg2900-audiofm.0: CG2900 Audio driver started
[ 24.918823] cg2900-uart cg2900-uart.0: Baud rate changed to 3000000 baud
[ 25.609161] cg2900-btacl cg2900-btacl.0: CG2900 self test failed
[ 25.673492] Bluetooth: CG2900 BT core is enabled
[ 27.809173] Bluetooth: CG2900 BT core is disabled
[ 27.813995] cg2900-uart cg2900-uart.0: Set chip power: DISABLE
[ 27.868743] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
[ 28.619171] cg2900-uart cg2900-uart.0: Set chip power: DISABLE

Failure 1:
root@android:/ # hciattach -a 23 -n -s 115200 /dev/ttyAMA0 cg2900 115200 flow &
[ 408.222320] cg2900-uart cg2900-uart.0: UART opened
[ 408.231292] cg2900-uart cg2900-uart.0: Transport connected
[ 408.236877] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
Device setup complete
[ 408.499389] cg2900-uart cg2900-uart.0: Received Read Local Version Information with:
[ 408.499420] hci_version: 0x06
[ 408.499450] hci_revision: 0x0200
[ 408.499450] lmp_pal_version: 0x06
[ 408.499481] manufacturer: 0x0030
[ 408.499481] hci_sub_version: 0x0000
[ 408.524444] cg2900-uart cg2900-uart.0: Chip supported by the CG2900 chip driver
[ 408.531951] cg2900-uart cg2900-uart.0: Chip handler found
[ 409.029113] cg2900-uart cg2900-uart.0: Set chip power: DISABLE
[ 409.049072] Bluetooth: CG2900 registered
[ 409.053802] Bluetooth: Open ST-Ericsson CG2900 driver
[ 409.060028] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
[ 409.071014] cg2900-audiobt cg2900-audiobt.0: CG2900 device added
[ 409.079376] cg2900-audiofm cg2900-audiofm.0: CG2900 Audio driver started
[ 409.429077] cg2900-uart cg2900-uart.0: Baud rate changed to 3000000 baud
[ 424.428924] cg2900-btacl cg2900-btacl.0: CG2900 driver failed to start
[ 424.435546] cg2900-uart cg2900-uart.0: Set chip power: DISABLE
[ 424.441864] Bluetooth: Couldn't open BT ACL channel (-5)

Failure 2:
root@android:/ # hciattach -a 23 -n -s 115200 /dev/ttyAMA0 cg2900 115200 flow &
[ 28.424346] cg2900-uart cg2900-uart.0: UART opened
[ 28.433349] cg2900-uart cg2900-uart.0: Transport connected
[ 28.439239] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
Device setup complete
[ 28.699218] cg2900-uart cg2900-uart.0: Received Read Local Version Information with:
[ 28.699249] hci_version: 0x06
[ 28.699279] hci_revision: 0x0200
[ 28.699279] lmp_pal_version: 0x06
[ 28.699310] manufacturer: 0x0030
[ 28.699310] hci_sub_version: 0x0000
[ 28.724212] cg2900-uart cg2900-uart.0: Chip supported by the CG2900 chip driver
[ 28.731964] cg2900-uart cg2900-uart.0: Chip handler found
[ 29.228485] cg2900-uart cg2900-uart.0: Set chip power: DISABLE
[ 29.246887] Bluetooth: CG2900 registered
[ 29.252014] Bluetooth: Open ST-Ericsson CG2900 driver
[ 29.257781] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
[ 29.270324] cg2900-audiobt cg2900-audiobt.0: CG2900 device added
[ 29.277435] cg2900-audiofm cg2900-audiofm.0: CG2900 Audio driver started
[ 29.628723] cg2900-uart cg2900-uart.0: Baud rate changed to 3000000 baud
[ 30.338989] cg2900-btacl cg2900-btacl.0: CG2900 self test failed
[ 30.403320] Bluetooth: CG2900 BT core is enabled
[ 37.720001] Bluetooth: Could not change VS BT Enable (false) state (3)
[ 37.726562] Bluetooth: Couldn't disable BT core (-13)
[ 37.731750] cg2900-uart cg2900-uart.0: Set chip power: DISABLE
[ 37.778961] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
[ 38.529296] cg2900-uart cg2900-uart.0: Set chip power: DISABLE

Failure 3:
root@android:/ # hciattach -a 23 -n -s 115200 /dev/ttyAMA0 cg2900 115200 flow &
[ 32.525177] cg2900-uart cg2900-uart.0: UART opened
[ 32.533966] cg2900-uart cg2900-uart.0: Transport connected
[ 32.539520] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
Device setup complete
[ 32.799346] cg2900-uart cg2900-uart.0: Received Read Local Version Information with:
[ 32.799377] hci_version: 0x06
[ 32.799407] hci_revision: 0x0200
[ 32.799407] lmp_pal_version: 0x06
[ 32.799438] manufacturer: 0x0030
[ 32.799438] hci_sub_version: 0x0000
[ 32.824371] cg2900-uart cg2900-uart.0: Chip supported by the CG2900 chip driver
[ 32.832092] cg2900-uart cg2900-uart.0: Chip handler found
[ 33.328826] cg2900-uart cg2900-uart.0: Set chip power: DISABLE
[ 33.348022] Bluetooth: CG2900 registered
[ 33.352752] Bluetooth: Open ST-Ericsson CG2900 driver
[ 33.358459] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
[ 33.371154] cg2900-audiobt cg2900-audiobt.0: CG2900 device added
[ 33.390136] cg2900-audiofm cg2900-audiofm.0: CG2900 Audio driver started
[ 33.729064] cg2900-uart cg2900-uart.0: Baud rate changed to 3000000 baud
[ 34.439331] cg2900-btacl cg2900-btacl.0: CG2900 self test failed
[ 34.503601] Bluetooth: CG2900 BT core is enabled
[ 36.641143] Bluetooth: CG2900 BT core is disabled
[ 36.645996] cg2900-uart cg2900-uart.0: Set chip power: DISABLE
[ 36.652221] Bluetooth: BTCG2900 Failed in supplying packet to Bluetooth stack (-6)
[ 36.708892] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
[ 37.459411] cg2900-uart cg2900-uart.0: Set chip power: DISABLE

3. Insert cw1200_wlan module:

root@android:/ # insmod /system/modules/cw1200_wlan.ko

On Failure you get following message:
[ 448.116760] cw1200_wlan: module is from the staging directory, the quality is unknown, you have been warned.
[ 448.130371] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
[ 448.499877] cg2900-uart cg2900-uart.0: Baud rate changed to 3000000 baud
[ 463.500122] cg2900-core cg2900-core.12: CG2900 driver failed to start
[ 463.506622] cg2900-uart cg2900-uart.0: Set chip power: DISABLE
[ 463.513427] platform cw1200_wlan: cw1200_clk_ctrl: Failed to sys_clk_out clk enable: -5
insmod: init_module '/system/modules/cw1200_wlan.ko' failed (I/O error)

On Success you get:
[ 472.966094] cw1200_wlan: module is from the staging directory, the quality is unknown, you have been warned.
[ 472.979644] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
[ 473.349884] cg2900-uart cg2900-uart.0: Baud rate changed to 3000000 baud
[ 474.060394] cg2900-core cg2900-core.12: CG2900 self test failed
[ 474.348052] mmc2: new SDIO card at address 0001
[ 474.487243] CW1200 WSM init done.
[ 474.487243] Input buffers: 8 x 1632 bytes
[ 474.487243] Hardware: 261.5
[ 474.487243] WSM firmware [WSM_A22.05.0328 Aug 16 2011 16:27:50], ver: 2205, build: 328, api: 1042, cap: 0x0009

4. Bring wlan0 interface up:

root@android:/ # netcfg wlan0 up