BBGW - wlcore crashes during boot with USB audio card installed

Hi,

I’m working on a project that requires audio input/ output, so using a C-Media chipset based solution from Sabrent.

With the latest BB.org kernel/ filesystem (Kernel 4.4.9, Debian 8.4), wlcore driver crashes during kernel boot if my USB audio card is installed. Booting without the card installed, then installing after the kernel seems to always work fine (WiFi throughput is normal, USB audio in/ out works as expected).

Occasionally I can poweroff, then back on, without removing USB audio card, and wlcore is happy. I would say this occurs < 10%.

Below are snippets of my kernel logs in good vs bad case:

debian@beaglebone:~$ uname -a

Linux beaglebone 4.4.9-ti-r25 #1 SMP Thu May 5 23:08:13 UTC 2016 armv7l GNU/Linux

GOOD:

[ 21.553728] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)

[ 21.727062] wlcore: loaded
[ 22.635026] wlcore: PHY firmware version: Rev 8.2.0.0.233
[ 22.982650] wlcore: firmware booted (Rev 8.9.0.1.55)
[ 23.321899] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 24.678734] Bluetooth: Core ver 2.21
[ 24.682608] NET: Registered protocol family 31
[ 24.682627] Bluetooth: HCI device and connection manager initialized
[ 24.682664] Bluetooth: HCI socket layer initialized
[ 24.682681] Bluetooth: L2CAP socket layer initialized
[ 24.682778] Bluetooth: SCO socket layer initialized
[ 24.721944] Bluetooth: HCI UART driver ver 2.3
[ 24.721973] Bluetooth: HCI UART protocol H4 registered
[ 24.721981] Bluetooth: HCI UART protocol BCSP registered
[ 24.721988] Bluetooth: HCI UART protocol LL registered
[ 24.721995] Bluetooth: HCI UART protocol ATH3K registered
[ 24.722002] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 24.724095] Bluetooth: HCI UART protocol BCM registered
[ 24.724115] Bluetooth: HCI UART protocol QCA registered
[ 25.093927] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 25.093951] Bluetooth: BNEP filters: protocol multicast
[ 25.093985] Bluetooth: BNEP socket layer initialized

FAIL:

[ 22.313743] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)

[ 22.480016] wlcore: loaded

[ 23.447478] wlcore: PHY firmware version: Rev 8.2.0.0.233

[ 23.856026] wlcore: firmware booted (Rev 8.9.0.1.55)

[ 24.185915] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

[ 25.025939] wlcore: ERROR ELP wakeup timeout!

[ 25.030401] ------------[ cut here ]------------

[ 25.030673] WARNING: CPU: 0 PID: 451 at drivers/net/wireless/ti/wlcore/main.c:797 wl12xx_queue_recovery_work.part.8+0x46/0x48 wlcore

[ 25.030683] Modules linked in: arc4 wl18xx wlcore mac80211 pruss_intc cfg80211 rfkill snd_soc_evm snd_soc_wilink8_bt pru_rproc omap_sham pruss omap_aes_driver snd_usb_audio snd_hwdep snd_usbmidi_lib snd_rawmidi snd_seq_device cm109 omap_rng rng_core snd_soc_davinci_mcasp snd_soc_edma snd_soc_omap snd_soc_core usb_f_acm snd_pcm_dmaengine u_serial usb_f_rndis g_multi usb_f_mass_storage u_ether libcomposite snd_pcm wlcore_sdio snd_timer snd soundcore evdev uio_pdrv_genirq uio

[ 25.030817] CPU: 0 PID: 451 Comm: wpa_supplicant Not tainted 4.4.9-ti-r25 #1

[ 25.030824] Hardware name: Generic AM33XX (Flattened Device Tree)

[ 25.030864] [] (unwind_backtrace) from [] (show_stack+0x11/0x14)

[ 25.030891] [] (show_stack) from [] (dump_stack+0x73/0x80)

[ 25.030920] [] (dump_stack) from [] (warn_slowpath_common+0x6b/0x94)

[ 25.030936] [] (warn_slowpath_common) from [] (warn_slowpath_null+0x17/0x1c)

[ 25.031043] [] (warn_slowpath_null) from [] (wl12xx_queue_recovery_work.part.8+0x46/0x48 [wlcore])

[ 25.031221] [] (wl12xx_queue_recovery_work.part.8 [wlcore]) from [] (wl12xx_queue_recovery_work+0x12/0x14 [wlcore])

[ 25.031365] [] (wl12xx_queue_recovery_work [wlcore]) from [] (wl1271_ps_elp_wakeup+0x192/0x198 [wlcore])

[ 25.031507] [] (wl1271_ps_elp_wakeup [wlcore]) from [] (wl1271_op_add_interface+0x78/0x774 [wlcore])

[ 25.032132] [] (wl1271_op_add_interface [wlcore]) from [] (drv_add_interface+0x38/0x118 [mac80211])

[ 25.032592] [] (drv_add_interface [mac80211]) from [] (ieee80211_do_open+0x2f4/0x668 [mac80211])

[ 25.032905] [] (ieee80211_do_open [mac80211]) from [] (ieee80211_start_p2p_device+0x3e/0x44 [mac80211])

[ 25.033590] [] (ieee80211_start_p2p_device [mac80211]) from [] (nl80211_start_p2p_device+0x50/0x120 [cfg80211])

[ 25.033868] [] (nl80211_start_p2p_device [cfg80211]) from [] (genl_rcv_msg+0x1b5/0x2bc)

[ 25.033887] [] (genl_rcv_msg) from [] (netlink_rcv_skb+0x75/0x84)

[ 25.033899] [] (netlink_rcv_skb) from [] (genl_rcv+0x21/0x30)

[ 25.033911] [] (genl_rcv) from [] (netlink_unicast+0xe3/0x178)

[ 25.033922] [] (netlink_unicast) from [] (netlink_sendmsg+0x381/0x454)

[ 25.033942] [] (netlink_sendmsg) from [] (sock_sendmsg+0x23/0x2c)

[ 25.033958] [] (sock_sendmsg) from [] (___sys_sendmsg+0x161/0x168)

[ 25.033973] [] (___sys_sendmsg) from [] (__sys_sendmsg+0x35/0x58)

[ 25.033995] [] (__sys_sendmsg) from [] (ret_fast_syscall+0x1/0x52)

[ 25.034162] —[ end trace d8e2deaaef207924 ]—

[ 25.037669] wlcore: Hardware recovery in progress. FW ver: Rev 8.9.0.1.55

[ 25.037693] ------------[ cut here ]------------

[ 25.037953] WARNING: CPU: 0 PID: 57 at drivers/net/wireless/ti/wlcore/io.h:65 wlcore_set_partition+0x6e/0x374 wlcore

[ 25.037963] Modules linked in: arc4 wl18xx wlcore mac80211 pruss_intc cfg80211 rfkill snd_soc_evm snd_soc_wilink8_bt pru_rproc omap_sham pruss omap_aes_driver snd_usb_audio snd_hwdep snd_usbmidi_lib snd_rawmidi snd_seq_device cm109 omap_rng rng_core snd_soc_davinci_mcasp snd_soc_edma snd_soc_omap snd_soc_core usb_f_acm snd_pcm_dmaengine u_serial usb_f_rndis g_multi usb_f_mass_storage u_ether libcomposite snd_pcm wlcore_sdio snd_timer snd soundcore evdev uio_pdrv_genirq uio

[ 25.038098] CPU: 0 PID: 57 Comm: kworker/u2:1 Tainted: G

W

4.4.9-ti-r25 #1

[ 25.038106] Hardware name: Generic AM33XX (Flattened Device Tree)

[ 25.038202] Workqueue: phy0 wl1271_recovery_work [wlcore]

[ 25.038241] [] (unwind_backtrace) from [] (show_stack+0x11/0x14)

[ 25.038266] [] (show_stack) from [] (dump_stack+0x73/0x80)

[ 25.038295] [] (dump_stack) from [] (warn_slowpath_common+0x6b/0x94)

[ 25.038310] [] (warn_slowpath_common) from [] (warn_slowpath_null+0x17/0x1c)

[ 25.038403] [] (warn_slowpath_null) from [] (wlcore_set_partition+0x6e/0x374 [wlcore])

[ 25.038552] [] (wlcore_set_partition [wlcore]) from [] (wl1271_recovery_work+0x60/0x250 [wlcore])

[ 25.038641] [] (wl1271_recovery_work [wlcore]) from [] (process_one_work+0xf1/0x328)

[ 25.038658] [] (process_one_work) from [] (worker_thread+0xe9/0x384)

[ 25.038675] [] (worker_thread) from [] (kthread+0xaf/0xc4)

[ 25.038695] [] (kthread) from [] (ret_from_fork+0x11/0x1c)

[ 25.038704] —[ end trace d8e2deaaef207925 ]—

[ 25.038724] wlcore: down

[ 25.045499] ieee80211 phy0: Hardware restart was requested

[ 52.349331] wlcore: ERROR timeout waiting for the hardware to complete initialization

[ 78.194635] wlcore: ERROR timeout waiting for the hardware to complete initialization

[ 104.038664] wlcore: ERROR timeout waiting for the hardware to complete initialization

[ 104.052349] wlcore: ERROR firmware boot failed despite 3 retries

[ 104.058540] ------------[ cut here ]------------

[ 104.059266] WARNING: CPU: 0 PID: 166 at net/mac80211/util.c:1854 ieee80211_reconfig+0x410/0xd74 mac80211

[ 104.059283] Modules linked in: arc4 wl18xx wlcore mac80211 pruss_intc cfg80211 rfkill snd_soc_evm snd_soc_wilink8_bt pru_rproc omap_sham pruss omap_aes_driver snd_usb_audio snd_hwdep snd_usbmidi_lib snd_rawmidi snd_seq_device cm109 omap_rng rng_core snd_soc_davinci_mcasp snd_soc_edma snd_soc_omap snd_soc_core usb_f_acm snd_pcm_dmaengine u_serial usb_f_rndis g_multi usb_f_mass_storage u_ether libcomposite snd_pcm wlcore_sdio snd_timer snd soundcore evdev uio_pdrv_genirq uio

[ 104.059489] CPU: 0 PID: 166 Comm: kworker/0:3 Tainted: G

W

4.4.9-ti-r25 #1

[ 104.059501] Hardware name: Generic AM33XX (Flattened Device Tree)

[ 104.059881] Workqueue: events_freezable ieee80211_restart_work [mac80211]

[ 104.059937] [] (unwind_backtrace) from [] (show_stack+0x11/0x14)

[ 104.059973] [] (show_stack) from [] (dump_stack+0x73/0x80)

[ 104.060013] [] (dump_stack) from [] (warn_slowpath_common+0x6b/0x94)

[ 104.060039] [] (warn_slowpath_common) from [] (warn_slowpath_null+0x17/0x1c)

[ 104.060365] [] (warn_slowpath_null) from [] (ieee80211_reconfig+0x410/0xd74 [mac80211])

[ 104.060881] [] (ieee80211_reconfig [mac80211]) from [] (ieee80211_restart_work+0x4a/0x70 [mac80211])

[ 104.061146] [] (ieee80211_restart_work [mac80211]) from [] (process_one_work+0xf1/0x328)

[ 104.061173] [] (process_one_work) from [] (worker_thread+0xe9/0x384)

[ 104.061199] [] (worker_thread) from [] (kthread+0xaf/0xc4)

[ 104.061228] [] (kthread) from [] (ret_from_fork+0x11/0x1c)

[ 104.061243] —[ end trace d8e2deaaef207926 ]—

[ 104.061498] ------------[ cut here ]------------

[ 104.062051] WARNING: CPU: 0 PID: 166 at net/mac80211/driver-ops.h:12 drv_remove_interface+0x74/0x114 mac80211

[ 104.062070] wlan0: Failed check-sdata-in-driver check, flags: 0x0

[ 104.062080] Modules linked in: arc4 wl18xx wlcore mac80211 pruss_intc cfg80211 rfkill snd_soc_evm snd_soc_wilink8_bt pru_rproc omap_sham pruss omap_aes_driver snd_usb_audio snd_hwdep snd_usbmidi_lib snd_rawmidi snd_seq_device cm109 omap_rng rng_core snd_soc_davinci_mcasp snd_soc_edma snd_soc_omap snd_soc_core usb_f_acm snd_pcm_dmaengine u_serial usb_f_rndis g_multi usb_f_mass_storage u_ether libcomposite snd_pcm wlcore_sdio snd_timer snd soundcore evdev uio_pdrv_genirq uio

[ 104.062272] CPU: 0 PID: 166 Comm: kworker/0:3 Tainted: G

W

4.4.9-ti-r25 #1

[ 104.062283] Hardware name: Generic AM33XX (Flattened Device Tree)

[ 104.062592] Workqueue: events_freezable ieee80211_restart_work [mac80211]

[ 104.062637] [] (unwind_backtrace) from [] (show_stack+0x11/0x14)

[ 104.062666] [] (show_stack) from [] (dump_stack+0x73/0x80)

[ 104.062700] [] (dump_stack) from [] (warn_slowpath_common+0x6b/0x94)

[ 104.062724] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x33/0x48)

[ 104.063013] [] (warn_slowpath_fmt) from [] (drv_remove_interface+0x74/0x114 [mac80211])

[ 104.063515] [] (drv_remove_interface [mac80211]) from [] (ieee80211_do_stop+0x348/0x570 [mac80211])

[ 104.064009] [] (ieee80211_do_stop [mac80211]) from [] (ieee80211_stop+0x12/0x18 [mac80211])

[ 104.064273] [] (ieee80211_stop [mac80211]) from [] (__dev_close_many+0x73/0xc0)

[ 104.064297] [] (__dev_close_many) from [] (dev_close_many+0x6d/0xe0)

[ 104.064322] [] (dev_close_many) from [] (dev_close.part.8+0x2f/0x44)

[ 104.064345] [] (dev_close.part.8) from [] (dev_close+0x15/0x18)

[ 104.065008] [] (dev_close) from [] (cfg80211_shutdown_all_interfaces+0x2a/0x74 [cfg80211])

[ 104.065851] [] (cfg80211_shutdown_all_interfaces [cfg80211]) from [] (ieee80211_handle_reconfig_failure+0x74/0x98 [mac80211])

[ 104.066445] [] (ieee80211_handle_reconfig_failure [mac80211]) from [] (ieee80211_reconfig+0x606/0xd74 [mac80211])

[ 104.066942] [] (ieee80211_reconfig [mac80211]) from [] (ieee80211_restart_work+0x4a/0x70 [mac80211])

[ 104.067209] [] (ieee80211_restart_work [mac80211]) from [] (process_one_work+0xf1/0x328)

[ 104.067237] [] (process_one_work) from [] (worker_thread+0xe9/0x384)

[ 104.067263] [] (worker_thread) from [] (kthread+0xaf/0xc4)

[ 104.067291] [] (kthread) from [] (ret_from_fork+0x11/0x1c)

[ 104.067439] —[ end trace d8e2deaaef207927 ]—

Hi Mike

Hi Robert,

Thank you for the suggestions!

Unfortunately updating the kernel did not fix the issue- pretty much the same backtraces.

I was thinking along the lines of getting a powered USB hub as well.

Interestingly, on the failed case, removing the USB audio card, then performing a warm reset is not enough- I must cold boot for wlcore to come up successfully again.

I will track down a powered hub and report back.

Regards,
Mike

Testing with a powered USB 2.0 hub did not change the behavior, unfortunately.

I’m beginning to think my WiLink8 module might be defective, or the driver has some serious issue. Listening to an audio stream, using VLC, the radio basically died:

[ 594.594514] wlcore: ERROR ELP wakeup timeout!
[ 596.130637] wlcore: ERROR ELP wakeup timeout!
[ 597.679125] wlcore: ERROR ELP wakeup timeout!

[ 599.815511] wlcore: ERROR timeout waiting for the hardware to complete initialization

[ 601.902753] wlcore: ERROR timeout waiting for the hardware to complete initialization
[ 603.993727] wlcore: ERROR timeout waiting for the hardware to complete initialization
[ 604.002765] wlcore: ERROR firmware boot failed despite 3 retries
[ 604.098278] wlan0: failed to remove key (0, 04:bd:88:26:df:01) from hardware (-5)
[ 604.327480] wlan0: failed to remove key (1, ff:ff:ff:ff:ff:ff) from hardware (-5)

Unfortunately I’m out of time to debug, so back to USB WiFi for now :frowning:

Regards,
Mike

Hey Mike

Here is the lastest firmware of bbgw updated by Seeed https://rcn-ee.net/rootfs/bb.org/testing/2016-07-21/seeed-iot/
You can try it.

在 2016年7月22日星期五 UTC+8上午2:19:18,Mike Erdahl写道:

Sorry for the delay, I didn’t get a notification of your posting.

I believe the real problem has been found, and it is unrelated to USB audio.

My system was configured to launch the AlexaBeagleBone project automatically on boot as a service. The AlexaBeagleBone service attempts to connect to Amazon immediately, which is a problem, because the wireless modules does not have an IP address yet.

In the case where I remove the USB audio, the AlexaBeagleBone service fails to launch, because it cannot open the audio card.

I realized all this because I’m having another similar issue where wlcore crashes when I try to launch the OpenSprinkler firmware during boot. I’ve tried creating a systemd service to wait for connman to setup wifi, but so far no luck…

If anyone knows how to create a proper systemd script that waits for connman to establish a wifi connection, I’d be pretty happy :slight_smile:

For now I’ll try to accomplish the same in a separate script.

Regards,
Mike

Hi,

Did you solve the issue.

Thanks,