We are using openembedded build with 3.8.13 kernel from https://github.com/beagleboard/meta-beagleboard.git meta package. Regarding the musb only one patch was applied from the mainline:
2ccc6d30a0abf3e1a38f264e279428b846712e0f usb: musb: fix bit mask for CSR in musb_h_tx_flush_fifo()
Currently I'm working with AM3352 CPU and Telit GSM GE910-QUAD module. This issue is also reproducible with Telit HE910-D module.
Driver registers as few (depending on specific module) ACM interfaces.
Sequence described below may cause the following warning from the musb_host driver.
This is the trace with few debug lines:
[ 89.791578] usb 1-1: USB disconnect, device number 3
[ 89.797731] cdc_acm 1-1:1.1: acm_start_wb - usb_submit_urb(write bulk) failed: -19
[ 89.806990] cdc_acm 1-1:1.1: acm_submit_read_urb - usb_submit_urb failed: -19
cat: write error[ 90.808226] ------------[ cut here ]------------
[ 90.813089] WARNING: at drivers/usb/musb/musb_host.c:125 musb_h_tx_flush_fifo+0x37/0x58()
[ 90.821626] Could not flush host TX2 fifo: csr: 2003
[ 90.826807] Modules linked in: ipv6 st_accel_i2c st_sensors_i2c st_accel st_sensors
[ 90.834886] [<c001030d>] (unwind_backtrace+0x1/0x88) from [<c002b467>] (warn_slowpath_common+0x33/0x48)
[ 90.844705] [<c002b467>] (warn_slowpath_common+0x33/0x48) from [<c002b497>] (warn_slowpath_fmt+0x1b/0x24)
[ 90.854704] [<c002b497>] (warn_slowpath_fmt+0x1b/0x24) from [<c025dbab>] (musb_h_tx_flush_fifo+0x37/0x58)
[ 90.864708] [<c025dbab>] (musb_h_tx_flush_fifo+0x37/0x58) from [<c025e359>] (musb_cleanup_urb.isra.9+0x29/0x5e)
[ 90.875254] [<c025e359>] (musb_cleanup_urb.isra.9+0x29/0x5e) from [<c025e431>] (musb_urb_dequeue+0xa3/0xba)
[ 90.885446] [<c025e431>] (musb_urb_dequeue+0xa3/0xba) from [<c024c707>] (unlink1+0x7f/0x8c)
[ 90.894178] [<c024c707>] (unlink1+0x7f/0x8c) from [<c024ce69>] (usb_hcd_unlink_urb+0x39/0x78)
[ 90.903092] [<c024ce69>] (usb_hcd_unlink_urb+0x39/0x78) from [<c024da03>] (usb_kill_urb+0x3b/0x9c)
[ 90.912457] [<c024da03>] (usb_kill_urb+0x3b/0x9c) from [<c02571fd>] (stop_data_traffic+0x1b/0x46)
[ 90.921730] [<c02571fd>] (stop_data_traffic+0x1b/0x46) from [<c02573e5>] (acm_disconnect+0x87/0x11e)
[ 90.931276] [<c02573e5>] (acm_disconnect+0x87/0x11e) from [<c024f7f5>] (usb_unbind_interface+0x39/0xcc)
[ 90.941098] [<c024f7f5>] (usb_unbind_interface+0x39/0xcc) from [<c01ef2df>] (__device_release_driver+0x3f/0x6c)
[ 90.951640] [<c01ef2df>] (__device_release_driver+0x3f/0x6c) from [<c01ef321>] (device_release_driver+0x15/0x1e)
[ 90.962272] [<c01ef321>] (device_release_driver+0x15/0x1e) from [<c01eef81>] (bus_remove_device+0x79/0x88)
[ 90.972359] [<c01eef81>] (bus_remove_device+0x79/0x88) from [<c01edc35>] (device_del+0xa5/0xf4)
[ 90.981448] [<c01edc35>] (device_del+0xa5/0xf4) from [<c024e89f>] (usb_disable_device+0x73/0x15c)
[ 90.990720] [<c024e89f>] (usb_disable_device+0x73/0x15c) from [<c0249d7b>] (usb_disconnect+0x61/0xc2)
[ 91.000358] [<c0249d7b>] (usb_disconnect+0x61/0xc2) from [<c024adc1>] (hub_thread+0x489/0xb2c)
[ 91.009368] [<c024adc1>] (hub_thread+0x489/0xb2c) from [<c003c121>] (kthread+0x61/0x74)
[ 91.017744] [<c003c121>] (kthread+0x61/0x74) from [<c000c579>] (ret_from_fork+0x11/0x38)
[ 91.026191] ---[ end trace eb343c18049e79af ]---
[ 92.022806] ------------[ cut here ]------------
[ 92.027637] WARNING: at drivers/usb/musb/musb_host.c:125 musb_h_tx_flush_fifo+0x37/0x58()
[ 92.036171] Could not flush host TX2 fifo: csr: 2003
[ 92.041350] Modules linked in: ipv6 st_accel_i2c st_sensors_i2c st_accel st_sensors
[ 92.049402] [<c001030d>] (unwind_backtrace+0x1/0x88) from [<c002b467>] (warn_slowpath_common+0x33/0x48)
[ 92.059216] [<c002b467>] (warn_slowpath_common+0x33/0x48) from [<c002b497>] (warn_slowpath_fmt+0x1b/0x24)
[ 92.069215] [<c002b497>] (warn_slowpath_fmt+0x1b/0x24) from [<c025dbab>] (musb_h_tx_flush_fifo+0x37/0x58)
[ 92.079215] [<c025dbab>] (musb_h_tx_flush_fifo+0x37/0x58) from [<c025de89>] (musb_start_urb+0x10f/0x45e)
[ 92.089125] [<c025de89>] (musb_start_urb+0x10f/0x45e) from [<c025e389>] (musb_cleanup_urb.isra.9+0x59/0x5e)
[ 92.099306] [<c025e389>] (musb_cleanup_urb.isra.9+0x59/0x5e) from [<c025e431>] (musb_urb_dequeue+0xa3/0xba)
[ 92.109487] [<c025e431>] (musb_urb_dequeue+0xa3/0xba) from [<c024c707>] (unlink1+0x7f/0x8c)
[ 92.118218] [<c024c707>] (unlink1+0x7f/0x8c) from [<c024ce69>] (usb_hcd_unlink_urb+0x39/0x78)
[ 92.127130] [<c024ce69>] (usb_hcd_unlink_urb+0x39/0x78) from [<c024da03>] (usb_kill_urb+0x3b/0x9c)
[ 92.136494] [<c024da03>] (usb_kill_urb+0x3b/0x9c) from [<c02571fd>] (stop_data_traffic+0x1b/0x46)
[ 92.145770] [<c02571fd>] (stop_data_traffic+0x1b/0x46) from [<c02573e5>] (acm_disconnect+0x87/0x11e)
[ 92.155312] [<c02573e5>] (acm_disconnect+0x87/0x11e) from [<c024f7f5>] (usb_unbind_interface+0x39/0xcc)
[ 92.165128] [<c024f7f5>] (usb_unbind_interface+0x39/0xcc) from [<c01ef2df>] (__device_release_driver+0x3f/0x6c)
[ 92.175669] [<c01ef2df>] (__device_release_driver+0x3f/0x6c) from [<c01ef321>] (device_release_driver+0x15/0x1e)
[ 92.186301] [<c01ef321>] (device_release_driver+0x15/0x1e) from [<c01eef81>] (bus_remove_device+0x79/0x88)
[ 92.196387] [<c01eef81>] (bus_remove_device+0x79/0x88) from [<c01edc35>] (device_del+0xa5/0xf4)
[ 92.205475] [<c01edc35>] (device_del+0xa5/0xf4) from [<c024e89f>] (usb_disable_device+0x73/0x15c)
[ 92.214748] [<c024e89f>] (usb_disable_device+0x73/0x15c) from [<c0249d7b>] (usb_disconnect+0x61/0xc2)
[ 92.224385] [<c0249d7b>] (usb_disconnect+0x61/0xc2) from [<c024adc1>] (hub_thread+0x489/0xb2c)
[ 92.233387] [<c024adc1>] (hub_thread+0x489/0xb2c) from [<c003c121>] (kthread+0x61/0x74)
[ 92.241757] [<c003c121>] (kthread+0x61/0x74) from [<c000c579>] (ret_from_fork+0x11/0x38)
[ 92.250202] ---[ end trace eb343c18049e79b0 ]---
This trace is shown at least 5 times (you can notice the difference between first part and the second one - first is coming from musb_cleanup_urb and the second one from musb_start_urb).
It is quite easy to reproduce with the following sequence:
Turn on GSM module (gpio high)
Send on pulse (gpio high and then low)
wait for tty to show up
cat /dev/{zero,urandom} > /dev/ttyACM0 & send off pulse (gpio high)
after another step (put pulse line low), driver is not able to flush the fifo, system is unstable and very slow since this moment.
Can you give us some ideas how to proceed with this issue?
If you need some more traces/informations let me know.