I have a problem with USB on a beaglebone black board.
I built the rootfs with yocto and I am using ver 4.4.21 of the Linux kernel. I am using meta-ti commit 1f4d266c4d293c326155d7a2051a9affa8722400 and linux-ti-staging_4.4.bb that fetches the kernel from git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git, branch ti-lsk-linux-4.4.y, srcrev=4fb4591a4ab1b3ef317fa87af3cd3c06f1a7284b.
I modified the original device-tree ( am335x-boneblack.dts) and removed the hdmi parts, that is I removed the “sound” section and the “tda19988” section and disabled the lcdc.
I connected a USB sound card.
When I play a wav-file, the kernel crashes after a few seconds with the message: musb-hdrc musb-hdrc.1.auto: Could not flush host TX2 fifo:
An interesting fact is that if I put back the “sound” section and the “tda19988” section in am335x-boneblack.dts( reverting to the original dts ) everything works fine, the board does not crash.
I tested with two different sound cards and the results are the same.
I have googled "Could not flush host TX2 fifo" and a lot of people seem to have similar problems but with older kernel versions. So, I would like to know if there are still issues in the sitara usb-driver?
Do anyone have any ideas on how to troubleshoot this problem?
root@beaglebone:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Device [USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Device [USB Audio Device], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@beaglebone:~# aplay out3.wav
Playing WAVE 'out3.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[ 69.688809] hrtimer: interrupt took 201500 ns
[ 86.460579] ------------[ cut here ]------------
[ 86.465359] WARNING: CPU: 0 PID: 336 at /home/andreas/src/Langedrag-Yocto/build/tmp/work-shared/beaglebone/kernel-source/drivers/usb/musb/musb_host.c:139 musb_h_tx_flush_fifo+0xdc/0xe8 [musb_hdrc]()
[ 86.483085] musb-hdrc musb-hdrc.1.auto: Could not flush host TX2 fifo: csr: 2403
[ 86.490513] Modules linked in: 8021q snd_usb_audio snd_hwdep snd_usbmidi_lib snd_rawmidi usbhid musb_dsps musb_hdrc udc_core usbcore pru_rproc pruss_intc pm33xx ecb sha256_generic hmac md5 sha1_generic sha1_arm_neon sha1_arm ti_emif_sram wkup_m3_ipc wkup_m3_rproc pruss remoteproc omap_aes_driver omap_sham virtio virtio_ring omap_rng rng_core musb_am335x rtc_omap omap_wdt
[ 86.523774] CPU: 0 PID: 336 Comm: aplay Not tainted 4.4.21-g4fb4591a4a #1
[ 86.530592] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 86.536711] Backtrace:
[ 86.539206] [<c00133a8>] (dump_backtrace) from [<c00135a4>] (show_stack+0x18/0x1c)
[ 86.546808] r7:bf122450 r6:0000008b r5:00000009 r4:00000000
[ 86.552533] [<c001358c>] (show_stack) from [<c02a7010>] (dump_stack+0x24/0x28)
[ 86.559802] [<c02a6fec>] (dump_stack) from [<c0031a60>] (warn_slowpath_common+0x88/0xb4)
[ 86.567935] [<c00319d8>] (warn_slowpath_common) from [<c0031ac4>] (warn_slowpath_fmt+0x38/0x40)
[ 86.576669] r8:dd9d447c r7:bf12c58c r6:e0bc2c10 r5:bf12c3a0 r4:bf12b800
[ 86.583476] [<c0031a90>] (warn_slowpath_fmt) from [<bf122450>] (musb_h_tx_flush_fifo+0xdc/0xe8 [musb_hdrc])
[ 86.593258] r3:bf12ada4 r2:bf12b800
[ 86.596860] r4:00002403
[ 86.599464] [<bf122374>] (musb_h_tx_flush_fifo [musb_hdrc]) from [<bf123558>] (musb_cleanup_urb+0xd0/0x14c [musb_hdrc])
[ 86.610292] r10:00000001 r9:bf12c58c r8:e0bc2c10 r7:00000000 r6:dde56100 r5:00000000
[ 86.618194] r4:dd9d447c
[ 86.620798] [<bf123488>] (musb_cleanup_urb [musb_hdrc]) from [<bf123cbc>] (musb_urb_dequeue+0x150/0x158 [musb_hdrc])
[ 86.631364] r10:00000001 r9:ddd43d00 r8:00000000 r7:00020200 r6:dd9d4010 r5:a00e0093
[ 86.639266] r4:dde56100
[ 86.642144] [<bf123b6c>] (musb_urb_dequeue [musb_hdrc]) from [<bf099858>] (unlink1+0x38/0x158 [usbcore])
[ 86.651666] r10:ddf0dcc8 r9:00000008 r8:a00e0093 r7:ffffff98 r6:ddf7d600 r5:dde56100
[ 86.659568] r4:dde56100 r3:bf123b6c
[ 86.663407] [<bf099820>] (unlink1 [usbcore]) from [<bf09bb28>] (usb_hcd_unlink_urb+0xa0/0xc0 [usbcore])
[ 86.672841] r8:a00e0093 r7:ffffff98 r6:dc988800 r5:dde56100 r4:00000000
[ 86.679823] [<bf09ba88>] (usb_hcd_unlink_urb [usbcore]) from [<bf09c6d0>] (usb_unlink_urb+0x34/0x50 [usbcore])
[ 86.689866] r9:00000008 r8:ddf93000 r7:ddf920e0 r6:ddf933f0 r5:ddf933ec r4:00000001
[ 86.697969] [<bf09c69c>] (usb_unlink_urb [usbcore]) from [<bf1689ec>] (deactivate_urbs.part.0+0x90/0xa4 [snd_usb_audio])
[ 86.708998] [<bf16895c>] (deactivate_urbs.part.0 [snd_usb_audio]) from [<bf168a60>] (deactivate_urbs+0x60/0x6c [snd_usb_audio])
[ 86.720524] r9:00000008 r8:ddcf7bb8 r7:00000001 r6:dde79a00 r5:ddf92000 r4:00000000
[ 86.728445] [<bf168a00>] (deactivate_urbs [snd_usb_audio]) from [<bf169bcc>] (snd_usb_endpoint_stop+0x38/0x64 [snd_usb_audio])
[ 86.739993] [<bf169b94>] (snd_usb_endpoint_stop [snd_usb_audio]) from [<bf172e3c>] (stop_endpoints+0x78/0x90 [snd_usb_audio])
[ 86.751344] r5:00000000 r4:dde79610
[ 86.755057] [<bf172dc4>] (stop_endpoints [snd_usb_audio]) from [<bf172fb8>] (snd_usb_substream_playback_trigger+0xac/0xc8 [snd_usb_audio])
[ 86.767543] r5:c0939038 r4:dde79610
[ 86.771221] [<bf172f0c>] (snd_usb_substream_playback_trigger [snd_usb_audio]) from [<c051a858>] (snd_pcm_do_stop+0x58/0x5c)
[ 86.782399] r5:c0939038 r4:dde79a00
[ 86.786011] [<c051a800>] (snd_pcm_do_stop) from [<c051a71c>] (snd_pcm_action_single+0x40/0x88)
[ 86.794672] [<c051a6dc>] (snd_pcm_action_single) from [<c051b954>] (snd_pcm_action+0xe8/0xec)
[ 86.803231] r7:00000001 r6:c0939038 r5:dde79abc r4:dde79a00
[ 86.808949] [<c051b86c>] (snd_pcm_action) from [<c051bb84>] (snd_pcm_drop+0x70/0xcc)
[ 86.816724] r7:ddeaf000 r6:ddf0dcc0 r5:dca62000 r4:dde79a00
[ 86.822442] [<c051bb14>] (snd_pcm_drop) from [<c051bc60>] (snd_pcm_release_substream.part.12+0x14/0xb4)
[ 86.831874] r5:ddcf7800 r4:dde79a00
[ 86.835483] [<c051bc4c>] (snd_pcm_release_substream.part.12) from [<c051bdb8>] (snd_pcm_release+0x90/0x9c)
[ 86.845177] r5:ddcf7800 r4:dde79a00
[ 86.848800] [<c051bd28>] (snd_pcm_release) from [<c010546c>] (__fput+0x88/0x204)
[ 86.856226] r9:00000008 r8:00000000 r7:ddf2d198 r6:ddcda9d0 r5:dd270110 r4:ddf0dcc0
[ 86.864048] [<c01053e4>] (__fput) from [<c0105640>] (____fput+0x10/0x14)
[ 86.870776] r10:00000000 r9:ddec2000 r8:c000fac4 r7:00000000 r6:c0943b38 r5:ddccf700
[ 86.878675] r4:ddccfafc
[ 86.881236] [<c0105630>] (____fput) from [<c004b7ac>] (task_work_run+0x78/0xa8)
[ 86.888590] [<c004b734>] (task_work_run) from [<c001300c>] (do_work_pending+0xbc/0xc0)
[ 86.896540] r7:00000006 r6:ddec3fb0 r5:c000fac4 r4:ddec2010
[ 86.902262] [<c0012f50>] (do_work_pending) from [<c000f954>] (slow_work_pending+0xc/0x20)
[ 86.910474] r7:00000006 r6:00000000 r5:0004e4dc r4:0004e3d0
[ 86.916187] ---[ end trace 54c43fe5f4acd401 ]---