USB Error (Errno 110) Timeout Issue, Kernel issue?

I have an issue with the USB timing out that I have narrowed down to something with the Beagle Bone, possible the USB drivers on the kernel? I have tested the all the libraries, python version, etc. in an identical virtual environment on my PC, everything works fine. 90% of code works on the BeagleBone, only select parts where I am sending a specfic command through the USB does this problem occur. I did some digging and it looks like something similar to what was happening a few years ago on of the earlier kernels. I have tried many of the older and newer kernels am currently running Kernel 4.9.36-ti-r45. All the kernels I have tested still had this problem. Below is the log:

Jul 11 15:33:35 beaglebone kernel: [ 518.768865] WARNING: CPU: 0 PID: 2150 at drivers/usb/musb/musb_host.c:140 musb_h_tx_flush_fifo+0xf0/0xf4
Jul 11 15:33:35 beaglebone kernel: [ 518.768878] musb-hdrc musb-hdrc.1: Could not flush host TX2 fifo: csr: 2003
Jul 11 15:33:35 beaglebone kernel: [ 518.768886] Modules linked in: c_can_platform c_can can_dev spi_omap2_mcspi pvrsrvkm(O) omap_sham omap_aes_driver snd_soc_simple_card crypto_engine snd_soc_simple_card_utils pruss_soc_bus omap_rng rng_core snd_soc_davinci_mcasp snd_soc_omap snd_soc_edma snd_soc_hdmi_codec snd_soc_core snd_pcm_dmaengine snd_pcm evdev snd_timer snd soundcore tps65217_charger uio_pdrv_genirq uio usb_f_mass_storage 8021q garp mrp stp llc usb_f_acm u_serial usb_f_ecm usb_f_rndis u_ether cpufreq_powersave cpufreq_userspace cpufreq_conservative libcomposite cpufreq_ondemand spidev pru_rproc pruss_intc pruss tieqep
Jul 11 15:33:35 beaglebone kernel: [ 518.769179] CPU: 0 PID: 2150 Comm: python Tainted: G O 4.9.36-ti-r45 #1
Jul 11 15:33:35 beaglebone kernel: [ 518.769186] Hardware name: Generic AM33XX (Flattened Device Tree)
Jul 11 15:33:35 beaglebone kernel: [ 518.769238] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
Jul 11 15:33:35 beaglebone kernel: [ 518.769259] [] (show_stack) from [] (dump_stack+0x90/0xa4)
Jul 11 15:33:35 beaglebone kernel: [ 518.769281] [] (dump_stack) from [] (__warn+0xf8/0x110)
Jul 11 15:33:35 beaglebone kernel: [ 518.769300] [] (__warn) from [] (warn_slowpath_fmt+0x58/0x74)
Jul 11 15:33:35 beaglebone kernel: [ 518.769318] [] (warn_slowpath_fmt) from [] (musb_h_tx_flush_fifo+0xf0/0xf4)
Jul 11 15:33:35 beaglebone kernel: [ 518.769337] [] (musb_h_tx_flush_fifo) from [] (musb_cleanup_urb+0x60/0xf0)
Jul 11 15:33:35 beaglebone kernel: [ 518.769354] [] (musb_cleanup_urb) from [] (musb_urb_dequeue+0x1b4/0x1d4)
Jul 11 15:33:35 beaglebone kernel: [ 518.769384] [] (musb_urb_dequeue) from [] (unlink1+0x3c/0x124)
Jul 11 15:33:35 beaglebone kernel: [ 518.769404] [] (unlink1) from [] (usb_hcd_unlink_urb+0x64/0xdc)
Jul 11 15:33:35 beaglebone kernel: [ 518.769422] [] (usb_hcd_unlink_urb) from [] (usb_kill_urb+0x6c/0xf4)
Jul 11 15:33:35 beaglebone kernel: [ 518.769451] [] (usb_kill_urb) from [] (usbdev_ioctl+0x1460/0x1d94)
Jul 11 15:33:35 beaglebone kernel: [ 518.769480] [] (usbdev_ioctl) from [] (do_vfs_ioctl+0xbc/0x9c8)
Jul 11 15:33:35 beaglebone kernel: [ 518.769501] [] (do_vfs_ioctl) from [] (SyS_ioctl+0x7c/0x8c)
Jul 11 15:33:35 beaglebone kernel: [ 518.769528] [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c)
Jul 11 15:33:35 beaglebone kernel: [ 518.769540] —[ end trace f94fcd49ef949ddc ]—

Let me know what other data I can post that would be relevant.

-Casey

I’m afraid that this is only a “me too” post. I have a USB sound card, which works fine on other systems, but produces the warning from the USB driver when it is asked to play audio (100% reproducible).

I’ve tried various kernels & all exhibit the fault:

I’ve tried turning off DMA, but that seems to make no difference.

[ 15.205213] ------------[ cut here ]------------
[ 15.210086] WARNING: CPU: 0 PID: 314 at drivers/usb/musb/musb_host.c:140 musb_h_tx_flush_fifo+0xe0/0xe4
[ 15.219905] musb-hdrc musb-hdrc.1: Could not flush host TX10 fifo: csr: 2003
[ 15.227269] Modules linked in: bmp280_i2c bmp280 rtc_ds1307 at24 rtl8192cu rtl_usb rtl8192c_common rtlwifi omap_wdt uio_pdrv_genirq hid_generic rtl8xxxu mac80211 cfg80211 rfkill
[ 15.243866] CPU: 0 PID: 314 Comm: MP3Player Not tainted 4.11.5 #1
[ 15.250231] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 15.256630] [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[ 15.264736] [] (show_stack) from [] (dump_stack+0x78/0x8c)
[ 15.272295] [] (dump_stack) from [] (__warn+0xe8/0x100)
[ 15.279574] [] (__warn) from [] (warn_slowpath_fmt+0x38/0x48)
[ 15.287400] [] (warn_slowpath_fmt) from [] (musb_h_tx_flush_fifo+0xe0/0xe4)
[ 15.296498] [] (musb_h_tx_flush_fifo) from [] (musb_cleanup_urb+0x138/0x204)
[ 15.305682] [] (musb_cleanup_urb) from [] (musb_urb_dequeue+0xd4/0x120)
[ 15.314424] [] (musb_urb_dequeue) from [] (usb_hcd_unlink_urb+0x68/0x84)
[ 15.323251] [] (usb_hcd_unlink_urb) from [] (deactivate_urbs+0xc8/0xe4)
[ 15.331984] [] (deactivate_urbs) from [] (snd_usb_endpoint_stop+0x30/0x40)
[ 15.340995] [] (snd_usb_endpoint_stop) from [] (stop_endpoints+0x5c/0x74)
[ 15.349911] [] (stop_endpoints) from [] (snd_usb_substream_playback_trigger+0xa8/0xc4)
[ 15.360015] [] (snd_usb_substream_playback_trigger) from [] (snd_pcm_do_stop+0x3c/0x5c)
[ 15.370201] [] (snd_pcm_do_stop) from [] (snd_pcm_action_single+0x38/0x78)
[ 15.379206] [] (snd_pcm_action_single) from [] (snd_pcm_drop+0x6c/0xc4)
[ 15.387938] [] (snd_pcm_drop) from [] (snd_pcm_release_substream.part.10+0xc/0xa8)
[ 15.397668] [] (snd_pcm_release_substream.part.10) from [] (snd_pcm_release+0x88/0x94)
[ 15.407770] [] (snd_pcm_release) from [] (__fput+0x84/0x1cc)
[ 15.415510] [] (__fput) from [] (task_work_run+0xb8/0xd8)
[ 15.422972] [] (task_work_run) from [] (do_work_pending+0x8c/0xb4)
[ 15.431251] [] (do_work_pending) from [] (slow_work_pending+0xc/0x20)
[ 15.439797] —[ end trace bef2c01b51321ace ]—