Hi, On Mon, Mar 14, 2016 at 03:33:51PM +0100, Yegor Yefremov wrote: > On Mon, Mar 14, 2016 at 3:01 PM, Bin Liu <b-liu@xxxxxx> wrote: > > Hi Yegor, > > > > On Mon, Mar 14, 2016 at 02:40:34PM +0100, Yegor Yefremov wrote: > >> On Mon, Mar 14, 2016 at 1:11 PM, Ladislav Michl <ladis@xxxxxxxxxxxxxx> wrote: > >> > On Mon, Mar 14, 2016 at 11:25:59AM +0100, Yegor Yefremov wrote: > >> > > >> > Hi Yegor, > >> > > >> >> Hi Bin, > >> >> > >> >> On Wed, Jan 27, 2016 at 11:01 AM, Ladislav Michl <ladis@xxxxxxxxxxxxxx> wrote: > >> >> > Any chance it will actually happen? MUSB is still unusable for me and > >> >> > doesn't work properly since TI's 2.6.37 kernel (oldest one I have > >> >> > tried)... > >> >> > >> >> The issue with musb_h_tx_flush_fifo still persists. Kernel 4.5.0-rc6. > >> >> Just activating SImCOM SIM7100E produces following error: > >> >> > >> >> # usb 1-1.3: new high-speed USB device number 6 using musb-hdrc > >> >> usbcore: registered new interface driver option > >> >> usbserial: USB Serial support registered for GSM modem (1-port) > >> >> option 1-1.3:1.0: GSM modem (1-port) converter detected > >> >> usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB4 > >> >> option 1-1.3:1.1: GSM modem (1-port) converter detected > >> >> usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB5 > >> >> option 1-1.3:1.2: GSM modem (1-port) converter detected > >> >> usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB6 > >> >> option 1-1.3:1.3: GSM modem (1-port) converter detected > >> >> usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB7 > >> >> option 1-1.3:1.4: GSM modem (1-port) converter detected > >> >> usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB8 > >> >> qmi_wwan 1-1.3:1.5: cdc-wdm0: USB WDM device > >> >> qmi_wwan 1-1.3:1.5 wwan0: register 'qmi_wwan' at > >> >> usb-musb-hdrc.0.auto-1.3, WWAN/QMI device, b2:67:d8:31:8f:b6 > >> >> usbcore: registered new interface driver qmi_wwan > >> >> ------------[ cut here ]------------ > >> >> WARNING: CPU: 0 PID: 868 at drivers/usb/musb/musb_host.c:139 > >> >> musb_h_tx_flush_fifo+0xc4/0xe4() > >> >> musb-hdrc musb-hdrc.0.auto: Could not flush host TX2 fifo: csr: 2403 > >> >> Modules linked in: qmi_wwan option usb_wwan ftdi_sio usbserial > >> >> musb_dsps musb_am335x > >> >> CPU: 0 PID: 868 Comm: ModemManager Not tainted 4.5.0-rc6 #47 > >> >> Hardware name: Generic AM33XX (Flattened Device Tree) > >> >> [<c0017e34>] (unwind_backtrace) from [<c0014088>] (show_stack+0x10/0x14) > >> >> [<c0014088>] (show_stack) from [<c02c5b24>] (dump_stack+0xb0/0xe4) > >> >> [<c02c5b24>] (dump_stack) from [<c003bca4>] (warn_slowpath_common+0x7c/0xb8) > >> >> [<c003bca4>] (warn_slowpath_common) from [<c003bd10>] > >> >> (warn_slowpath_fmt+0x30/0x40) > >> >> [<c003bd10>] (warn_slowpath_fmt) from [<c041ec10>] > >> >> (musb_h_tx_flush_fifo+0xc4/0xe4) > >> >> [<c041ec10>] (musb_h_tx_flush_fifo) from [<c041fd54>] > >> >> (musb_cleanup_urb+0xbc/0x130) > >> >> [<c041fd54>] (musb_cleanup_urb) from [<c0420404>] (musb_urb_dequeue+0xf0/0x128) > >> >> [<c0420404>] (musb_urb_dequeue) from [<c03fa82c>] (usb_hcd_unlink_urb+0x50/0x84) > >> >> [<c03fa82c>] (usb_hcd_unlink_urb) from [<c03fba70>] (usb_kill_urb+0x4c/0xc4) > >> >> [<c03fba70>] (usb_kill_urb) from [<bf02f85c>] > >> >> (usb_wwan_close+0xbc/0xf0 [usb_wwan]) > >> >> [<bf02f85c>] (usb_wwan_close [usb_wwan]) from [<c0322ce8>] > >> >> (tty_port_shutdown+0x90/0x9c) > >> >> [<c0322ce8>] (tty_port_shutdown) from [<c03233cc>] (tty_port_close+0x24/0x4c) > >> >> [<c03233cc>] (tty_port_close) from [<c031a258>] (tty_release+0xec/0x478) > >> >> [<c031a258>] (tty_release) from [<c014ef38>] (__fput+0x80/0x1d0) > >> >> [<c014ef38>] (__fput) from [<c005a8d8>] (task_work_run+0x90/0xc4) > >> >> [<c005a8d8>] (task_work_run) from [<c0013a4c>] (do_work_pending+0x8c/0xb4) > >> >> [<c0013a4c>] (do_work_pending) from [<c000f8e8>] (slow_work_pending+0xc/0x20) > >> >> ---[ end trace fb2fc0420e2c4594 ]--- > >> >> > >> >> Could you please take a look at this? > >> >> > >> >> Yegor > >> > > >> > I cannot reproduce it anymore, as commits > >> > 4c2ba0c67394514f3f75c660c9f5d02e66a7efd4 > >> > bba40e6948b94cba71965285fbac31bd078c024a > >> > fixed issue for me (using Inventra DMA on DM3730) - but those two are part > >> > of 4.5.0-rc6 ... > >> > >> You are lucky! I've tried 4.5.0 and I still have this issue, though > >> I'm on am335x and not on DM3730: > > > > How do you trigger the issue? Plug the modem then unplug it? > > Can you please try the way in [1] to increase the loops to see if the > > fifo could be flushed in a longer time? > > > > Regards, > > -Bin. > > > > [1] http://www.spinics.net/lists/linux-usb/msg137242.html > > Do you mean something like this? > > diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c > index 58487a4..f6d6822 100644 > --- a/drivers/usb/musb/musb_host.c > +++ b/drivers/usb/musb/musb_host.c > @@ -112,7 +112,7 @@ static void musb_h_tx_flush_fifo(struct musb_hw_ep *ep) > struct musb *musb = ep->musb; > void __iomem *epio = ep->regs; > u16 csr; > - int retries = 1000; > + int retries = 10000; Yes. > > csr = musb_readw(epio, MUSB_TXCSR); > while (csr & MUSB_TXCSR_FIFONOTEMPTY) { > > No, it doesn't help. I'm triggering this issue via enabling it, i.e. > our hardware can power on/off mPCIe slot via GPIO pin. When the system > starts mPCI slot is disabled. The I enable it after booting into user > space and the produces the error. It also happens if I insert USB Ok. I can imagine the device is no longer functional due to the fifo flush issue. > modem as a dongle, where usb_modeswitch first has to switch it from > CD-ROM mode into modem mode. Any detail of the usb modem dongle? I will try to find one to take a look. I have a few usb modems but none of them triggers this problem. Regards, -Bin. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html