Intermittent: cg2900 fails to start

Bug #918643 reported by Amit Pundir
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
IglooCommunity
Fix Released
High
Unassigned
Linaro Android
Fix Released
High
Unassigned

Bug Description

Description:
==========
Turn ON WiFi (from power control widget on ICS)
WiFi turn ON Fails sometimes.

Serial Logs snippet:

 # dmesg
[  116.727844] cw1200_wlan: module is from the staging directory, the quality is unknown, you have been warned.
[  116.745849] cg2900-uart cg2900-uart.0: Set chip power: ENABLE
[  117.119812] cg2900-uart cg2900-uart.0: Baud rate changed to 3000000 baud
[  132.119537] cg2900-core cg2900-core.0: CG2900 driver failed to start
[  132.119598] cg2900-uart cg2900-uart.0: Set chip power: DISABLE
[  132.120147] platform cw1200_wlan: cw1200_clk_ctrl: Failed to sys_clk_out clk enable: -5

#logcat
E/WifiStateMachine( 1668): Failed to load driver!
E/WifiStateMachine( 1668): DriverFailedState

Reproducible:
===========
Yes (2/5 times)

Steps:
==========
1. Bootup DUT
2. Turn ON WiFi from power control widget
Observation: UI shows "Error" message.
Expected: WiFi should turn ON. but fails to turn on sometimes. Only way out is to reboot.

Hardware:
==========
Snowball: V11
HDMI Out to DVI port on TV - (via HDMI-DVI adapter)
USB-Serial Logging

Software:
==========
ICS: https://android-build.linaro.org/builds/~linaro-android/landing-snowball/#build=136

Amit Pundir (pundiramit)
Changed in linaro-android:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Amit Pundir (pundiramit)
Revision history for this message
Amit Pundir (pundiramit) wrote :

After enabling WiFi menu under "Settings", I realized that even if cg2900 driver fails to power-up wlan, I can restart WiFi daemon without restarting the board.

Revision history for this message
Amit Pundir (pundiramit) wrote :

The above comment came out wrong. I meant that cg2900 driver is able to power-up wlan chip in multiple(~2) tries.

Changed in linaro-android:
assignee: Amit Pundir (pundiramit) → Thomas Espersson (espersson)
Revision history for this message
Amit Pundir (pundiramit) wrote :
Download full text (8.1 KiB)

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:...

Read more...

Revision history for this message
Mathieu Poirier (mathieu.poirier-deactivatedaccount) wrote :

We need help addressing the 3 failure scenario Amit depicted above. These occur when starting the BT stack and happen in more than 50% of the cases, rendering the wifi feature useless. We have also observed kernel crashes and dumps when the system is started with BT enabled.

The following error is reported when the BT stack encounters and error during initialization:

[ 463.513427] platform cw1200_wlan: cw1200_clk_ctrl: Failed to sys_clk_out clk enable: -5

This is normal and expected since the BT driver is smart enough to cleanup after itself upon recognizing an error condition. From there nothing works since cw1200_wlan need clock "sys_clk_out" to be instantiated.

I'm convinced we are facing more than one issue, which make the problem that much harder to characterise. It would be greatly appreciated if a connectivy kernel expert from STE could work with us to stabilize/fix the BT and wifi drivers.

Anmar Oueja (anmar)
Changed in igloocommunity:
assignee: nobody → Thomas Espersson (espersson)
Changed in linaro-android:
assignee: Thomas Espersson (espersson) → nobody
Changed in igloocommunity:
importance: Undecided → High
Revision history for this message
Thomas Espersson (espersson) wrote :

Being investigated by STE connectivity people

Changed in igloocommunity:
milestone: none → 2012.02
Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :
Anmar Oueja (anmar)
summary: - snowball: wlan module fails to power up wlan chip sometimes
+ cw1200 clock control IO error
Anmar Oueja (anmar)
summary: - cw1200 clock control IO error
+ Intermittent: cg2900 fails to start
Anmar Oueja (anmar)
Changed in igloocommunity:
status: New → Confirmed
Anmar Oueja (anmar)
Changed in igloocommunity:
status: Confirmed → In Progress
milestone: 2012.02 → 2012.03
Changed in igloocommunity:
assignee: Thomas Espersson (espersson) → Jayeeta Bandyopadhyay (jayeeta)
Changed in igloocommunity:
assignee: Jayeeta Bandyopadhyay (jayeeta) → Mathieu Poirier (mathieu.poirier)
Revision history for this message
Mathieu Poirier (mathieu.poirier-deactivatedaccount) wrote :

The new 3.3 [1] kernel is powering the chip properly now but intermittent connectivity issues still persist.

[1]. http://www.igloocommunity.org/gitweb/?p=kernel/igloo-kernel.git;a=shortlog;h=refs/heads/stable-android-ux500-3.3

Revision history for this message
Mathieu Poirier (mathieu.poirier-deactivatedaccount) wrote :

I havent' seen any critical failures when the cg2900 chip is initialised with the latest stable-android-ux500-3.3 kernel. I would like to get more testing done on it before closing the bug.

Revision history for this message
Anmar Oueja (anmar) wrote : Re: [Bug 918643] Re: Intermittent: cg2900 fails to start

If next week's testing yields satisfactory results, we should be good.
For now, I suggest we mark this bug as "Fix committed".

Revision history for this message
Mathieu Poirier (mathieu.poirier-deactivatedaccount) wrote :

Thanks to all the starts for their help on this.

Changed in linaro-android:
assignee: nobody → Mathieu Poirier (mathieu.poirier)
status: Confirmed → Fix Committed
Changed in igloocommunity:
status: In Progress → Fix Committed
Changed in igloocommunity:
status: Fix Committed → Fix Released
Revision history for this message
Abhishek Paliwal (abhishek-paliwal) wrote :
Devanathan (pdydeva)
Changed in linaro-android:
status: Fix Committed → Confirmed
vishal (vishalbhoj)
Changed in linaro-android:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.