diff mbox

Linux 4.2.0-rc5: am335x: musb warnings

Message ID 20151013234712.GA23406@localhost.localdomain (mailing list archive)
State New, archived
Headers show

Commit Message

Ladislav Michl Oct. 13, 2015, 11:47 p.m. UTC
On Mon, Aug 31, 2015 at 03:11:58PM +0200, Yegor Yefremov wrote:
> Hi Felipe,
> 
> On Fri, Aug 7, 2015 at 12:57 PM, Yegor Yefremov
> <yegorslists@googlemail.com> wrote:
> > On Fri, Aug 7, 2015 at 12:16 PM, Yegor Yefremov
> > <yegorslists@googlemail.com> wrote:
> >> On Thu, Aug 6, 2015 at 4:21 PM, Felipe Balbi <balbi@ti.com> wrote:
> >>> HI,
> >>>
> >>> On Thu, Aug 06, 2015 at 09:40:26AM +0200, Yegor Yefremov wrote:
> >>>> I performed a stress test with several FT4232H chips connected to a
> >>>
> >>> how many ?
> >>
> >> # lsusb -t
> >> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
> >> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
> >>     |__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
> >>         |__ Port 1: Dev 3, If 0, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 1: Dev 3, If 1, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 1: Dev 3, If 2, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 1: Dev 3, If 3, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 2: Dev 4, If 0, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 2: Dev 4, If 1, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 2: Dev 4, If 2, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 2: Dev 4, If 3, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 3: Dev 5, If 0, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 3: Dev 5, If 1, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 3: Dev 5, If 2, Class=, Driver=ftdi_sio, 480M
> >>         |__ Port 3: Dev 5, If 3, Class=, Driver=ftdi_sio, 480M
> >>
> >> 3 chips a 4-ports are attached.
> >
> > Warnings appear on another device (without internal hub) with only one
> > FT4232H too:
> >
> > # lsusb -t
> > /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
> >     |__ Port 1: Dev 2, If 0, Class=, Driver=ftdi_sio, 480M
> >     |__ Port 1: Dev 2, If 1, Class=, Driver=ftdi_sio, 480M
> >     |__ Port 1: Dev 2, If 2, Class=, Driver=ftdi_sio, 480M
> >     |__ Port 1: Dev 2, If 3, Class=, Driver=ftdi_sio, 480M
> >
> >>>> hub, that is attached to one of the musb ports. So far the test was
> >>>> successful for several hours. But I've seen following warnings:
> >>>>
> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
> >>>> musb_ep_program 931: broken !rx_reinit, ep5 csr 0203
> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
> >>>> musb_ep_program 931: broken !rx_reinit, ep5 csr 0003
> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
> >>>> musb_ep_program 931: broken !rx_reinit, ep7 csr 0003
> >>>>
> >>>> Is this expected behavior?
> >>>
> >>> no, that shouldn't happen, but it does and, apparently, in more than one
> >>> implementation. Wondering if you're running into endpoint limitation due
> >>> to MUSB's poor transfer scheduling for non-bulk endpoints.

To add more:
kernel 4.2.0 on AM3703 musb in DMA mode with Quectel U15 modem plugged:
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 3, If 0, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 4: Dev 3, If 1, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 4: Dev 3, If 2, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 4: Dev 3, If 3, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 4: Dev 3, If 4, Class=Vendor Specific Class, Driver=option, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-omap/3p, 480M

 musb_ep_program 931: broken !rx_reinit, ep2 csr a203
 musb_host_rx 1973: Rx interrupt with no errors or packet!
 musb_ep_program 931: broken !rx_reinit, ep5 csr a203
 musb_host_rx 1973: Rx interrupt with no errors or packet!

and in both PIO and DMA mode write to device ends this way:
 ------------[ cut here ]------------
 WARNING: CPU: 0 PID: 146 at drivers/usb/musb/musb_host.c:128 musb_h_tx_flush_fifo+0x84/0xb8()
 Could not flush host TX2 fifo: csr: 2003
 Modules linked in: option usb_wwan usbserial snd_soc_omap_twl4030 cpufreq_dt snd_soc_omap_mcbsp snd_soc_omap snd_soc_twl4030 snd_pcm_dmaengine omap_aes snd_soc_core omap_sham omap_mailbox s
 CPU: 0 PID: 146 Comm: ModemManager Not tainted 4.2.0 #3
 Hardware name: Generic OMAP36xx (Flattened Device Tree)
 [<c0013ad4>] (unwind_backtrace) from [<c0011be8>] (show_stack+0x10/0x14)
 [<c0011be8>] (show_stack) from [<c003181c>] (warn_slowpath_common+0x84/0xac)
 [<c003181c>] (warn_slowpath_common) from [<c0031870>] (warn_slowpath_fmt+0x2c/0x3c)
 [<c0031870>] (warn_slowpath_fmt) from [<c02e6a64>] (musb_h_tx_flush_fifo+0x84/0xb8)
 [<c02e6a64>] (musb_h_tx_flush_fifo) from [<c02e7ee0>] (musb_cleanup_urb.isra.13+0xa0/0x12c)
 [<c02e7ee0>] (musb_cleanup_urb.isra.13) from [<c02e8060>] (musb_urb_dequeue+0xf4/0x114)
 [<c02e8060>] (musb_urb_dequeue) from [<c02cdda0>] (usb_hcd_unlink_urb+0x60/0x7c)
 [<c02cdda0>] (usb_hcd_unlink_urb) from [<c02ceb9c>] (usb_kill_urb+0x4c/0xc4)
 [<c02ceb9c>] (usb_kill_urb) from [<bf1638d8>] (usb_wwan_close+0x94/0xb0 [usb_wwan])
 [<bf1638d8>] (usb_wwan_close [usb_wwan]) from [<c025d0cc>] (tty_port_shutdown+0x7c/0x88)
 [<c025d0cc>] (tty_port_shutdown) from [<c025d9a0>] (tty_port_close+0x24/0x58)
 [<c025d9a0>] (tty_port_close) from [<c0256494>] (tty_release+0x128/0x40c)
 [<c0256494>] (tty_release) from [<c00c9aa0>] (__fput+0xd4/0x1a4)
 [<c00c9aa0>] (__fput) from [<c004937c>] (task_work_run+0x9c/0xb0)
 [<c004937c>] (task_work_run) from [<c0011688>] (do_work_pending+0xa0/0xb8)
 [<c0011688>] (do_work_pending) from [<c000e904>] (work_pending+0xc/0x20)
 ---[ end trace b14c1d9333664980 ]---

and device (U15) does not work. Also any other device pluged into that hub
after warning is printed does not work any more (udlfb worked before).

Just for completeness, here's a patch used:

> Now I have another trouble with msub and FTDI FT4232H chip. If I start
> something like this on all 4 ports at 115200b/s, then pull USB cable
> and the system freezes:
> 
> cat /dev/urandom > /dev/ttyUSB0
> ...
> cat /dev/urandom > /dev/ttyUSB3
> 
> I see these messages:
> 
> ftdi_sio ttyUSB3: usb_serial_generic_write_bulk_callback - nonzero urb
> status: -110
> ftdi_sio ttyUSB0: usb_serial_generic_write_bulk_callback - nonzero urb
> status: -110
> ftdi_sio ttyUSB1: usb_serial_generic_write_bulk_callback - nonzero urb
> status: -110
> ftdi_sio ttyUSB2: usb_serial_generic_write_bulk_callback - nonzero urb
> status: -110
> ftdi_sio ttyUSB3: usb_serial_generic_write_bulk_callback - nonzero urb
> status: -110
> ftdi_sio ttyUSB0: usb_serial_generic_write_bulk_callback - nonzero urb
> status: -110
> ftdi_sio ttyUSB1: usb_serial_generic_write_bulk_callback - nonzero urb
> status: -110
> ftdi_sio ttyUSB2: usb_serial_generic_write_bulk_callback - nonzero urb
> status: -110
> ftdi_sio ttyUSB3: usb_serial_generic_write_bulk_callback - nonzero urb
> status: -110
> 
> After them system reboots as my watchdog time expires.
> 
> Kernel 4.2.0-rc5
> 
> Older FTDI chips like FT2232 have no problems. Somehow is musb really
> allergic to FTDI and vice versa :-(

That probably depends on transfer size...

Best regards,
	ladis
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Yegor Yefremov Dec. 30, 2015, 10:06 a.m. UTC | #1
Hi Felipe, hi Ladislav,

On Wed, Oct 14, 2015 at 1:47 AM, Ladislav Michl <ladis@linux-mips.org> wrote:
> On Mon, Aug 31, 2015 at 03:11:58PM +0200, Yegor Yefremov wrote:
>> Hi Felipe,
>>
>> On Fri, Aug 7, 2015 at 12:57 PM, Yegor Yefremov
>> <yegorslists@googlemail.com> wrote:
>> > On Fri, Aug 7, 2015 at 12:16 PM, Yegor Yefremov
>> > <yegorslists@googlemail.com> wrote:
>> >> On Thu, Aug 6, 2015 at 4:21 PM, Felipe Balbi <balbi@ti.com> wrote:
>> >>> HI,
>> >>>
>> >>> On Thu, Aug 06, 2015 at 09:40:26AM +0200, Yegor Yefremov wrote:
>> >>>> I performed a stress test with several FT4232H chips connected to a
>> >>>
>> >>> how many ?
>> >>
>> >> # lsusb -t
>> >> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
>> >> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
>> >>     |__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
>> >>         |__ Port 1: Dev 3, If 0, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 1: Dev 3, If 1, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 1: Dev 3, If 2, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 1: Dev 3, If 3, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 2: Dev 4, If 0, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 2: Dev 4, If 1, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 2: Dev 4, If 2, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 2: Dev 4, If 3, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 3: Dev 5, If 0, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 3: Dev 5, If 1, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 3: Dev 5, If 2, Class=, Driver=ftdi_sio, 480M
>> >>         |__ Port 3: Dev 5, If 3, Class=, Driver=ftdi_sio, 480M
>> >>
>> >> 3 chips a 4-ports are attached.
>> >
>> > Warnings appear on another device (without internal hub) with only one
>> > FT4232H too:
>> >
>> > # lsusb -t
>> > /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
>> >     |__ Port 1: Dev 2, If 0, Class=, Driver=ftdi_sio, 480M
>> >     |__ Port 1: Dev 2, If 1, Class=, Driver=ftdi_sio, 480M
>> >     |__ Port 1: Dev 2, If 2, Class=, Driver=ftdi_sio, 480M
>> >     |__ Port 1: Dev 2, If 3, Class=, Driver=ftdi_sio, 480M
>> >
>> >>>> hub, that is attached to one of the musb ports. So far the test was
>> >>>> successful for several hours. But I've seen following warnings:
>> >>>>
>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>> >>>> musb_ep_program 931: broken !rx_reinit, ep5 csr 0203
>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>> >>>> musb_ep_program 931: broken !rx_reinit, ep5 csr 0003
>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>> >>>> musb_ep_program 931: broken !rx_reinit, ep7 csr 0003
>> >>>>
>> >>>> Is this expected behavior?
>> >>>
>> >>> no, that shouldn't happen, but it does and, apparently, in more than one
>> >>> implementation. Wondering if you're running into endpoint limitation due
>> >>> to MUSB's poor transfer scheduling for non-bulk endpoints.
>
> To add more:
> kernel 4.2.0 on AM3703 musb in DMA mode with Quectel U15 modem plugged:
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
>     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
>         |__ Port 4: Dev 3, If 0, Class=Vendor Specific Class, Driver=option, 480M
>         |__ Port 4: Dev 3, If 1, Class=Vendor Specific Class, Driver=option, 480M
>         |__ Port 4: Dev 3, If 2, Class=Vendor Specific Class, Driver=option, 480M
>         |__ Port 4: Dev 3, If 3, Class=Vendor Specific Class, Driver=option, 480M
>         |__ Port 4: Dev 3, If 4, Class=Vendor Specific Class, Driver=option, 480M
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-omap/3p, 480M
>
>  musb_ep_program 931: broken !rx_reinit, ep2 csr a203
>  musb_host_rx 1973: Rx interrupt with no errors or packet!
>  musb_ep_program 931: broken !rx_reinit, ep5 csr a203
>  musb_host_rx 1973: Rx interrupt with no errors or packet!
>
> and in both PIO and DMA mode write to device ends this way:
>  ------------[ cut here ]------------
>  WARNING: CPU: 0 PID: 146 at drivers/usb/musb/musb_host.c:128 musb_h_tx_flush_fifo+0x84/0xb8()
>  Could not flush host TX2 fifo: csr: 2003
>  Modules linked in: option usb_wwan usbserial snd_soc_omap_twl4030 cpufreq_dt snd_soc_omap_mcbsp snd_soc_omap snd_soc_twl4030 snd_pcm_dmaengine omap_aes snd_soc_core omap_sham omap_mailbox s
>  CPU: 0 PID: 146 Comm: ModemManager Not tainted 4.2.0 #3
>  Hardware name: Generic OMAP36xx (Flattened Device Tree)
>  [<c0013ad4>] (unwind_backtrace) from [<c0011be8>] (show_stack+0x10/0x14)
>  [<c0011be8>] (show_stack) from [<c003181c>] (warn_slowpath_common+0x84/0xac)
>  [<c003181c>] (warn_slowpath_common) from [<c0031870>] (warn_slowpath_fmt+0x2c/0x3c)
>  [<c0031870>] (warn_slowpath_fmt) from [<c02e6a64>] (musb_h_tx_flush_fifo+0x84/0xb8)
>  [<c02e6a64>] (musb_h_tx_flush_fifo) from [<c02e7ee0>] (musb_cleanup_urb.isra.13+0xa0/0x12c)
>  [<c02e7ee0>] (musb_cleanup_urb.isra.13) from [<c02e8060>] (musb_urb_dequeue+0xf4/0x114)
>  [<c02e8060>] (musb_urb_dequeue) from [<c02cdda0>] (usb_hcd_unlink_urb+0x60/0x7c)
>  [<c02cdda0>] (usb_hcd_unlink_urb) from [<c02ceb9c>] (usb_kill_urb+0x4c/0xc4)
>  [<c02ceb9c>] (usb_kill_urb) from [<bf1638d8>] (usb_wwan_close+0x94/0xb0 [usb_wwan])
>  [<bf1638d8>] (usb_wwan_close [usb_wwan]) from [<c025d0cc>] (tty_port_shutdown+0x7c/0x88)
>  [<c025d0cc>] (tty_port_shutdown) from [<c025d9a0>] (tty_port_close+0x24/0x58)
>  [<c025d9a0>] (tty_port_close) from [<c0256494>] (tty_release+0x128/0x40c)
>  [<c0256494>] (tty_release) from [<c00c9aa0>] (__fput+0xd4/0x1a4)
>  [<c00c9aa0>] (__fput) from [<c004937c>] (task_work_run+0x9c/0xb0)
>  [<c004937c>] (task_work_run) from [<c0011688>] (do_work_pending+0xa0/0xb8)
>  [<c0011688>] (do_work_pending) from [<c000e904>] (work_pending+0xc/0x20)
>  ---[ end trace b14c1d9333664980 ]---
>
> and device (U15) does not work. Also any other device pluged into that hub
> after warning is printed does not work any more (udlfb worked before).
>
> Just for completeness, here's a patch used:
> --- linux-4.2/drivers/usb/serial/option.c.orig  2015-10-13 02:43:23.363254239 +0200
> +++ linux-4.2/drivers/usb/serial/option.c       2015-10-13 02:44:24.663254239 +0200
> @@ -1097,6 +1097,7 @@
>         { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
>         { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
>         { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
> +       { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9090)}, /* QUECTEL UC15 */
>         { USB_DEVICE_INTERFACE_CLASS(SIERRA_VENDOR_ID, 0x68c0, 0xff),
>           .driver_info = (kernel_ulong_t)&sierra_mc73xx_blacklist }, /* MC73xx */
>         { USB_DEVICE_INTERFACE_CLASS(SIERRA_VENDOR_ID, 0x9041, 0xff),
>
>> Now I have another trouble with msub and FTDI FT4232H chip. If I start
>> something like this on all 4 ports at 115200b/s, then pull USB cable
>> and the system freezes:
>>
>> cat /dev/urandom > /dev/ttyUSB0
>> ...
>> cat /dev/urandom > /dev/ttyUSB3
>>
>> I see these messages:
>>
>> ftdi_sio ttyUSB3: usb_serial_generic_write_bulk_callback - nonzero urb
>> status: -110
>> ftdi_sio ttyUSB0: usb_serial_generic_write_bulk_callback - nonzero urb
>> status: -110
>> ftdi_sio ttyUSB1: usb_serial_generic_write_bulk_callback - nonzero urb
>> status: -110
>> ftdi_sio ttyUSB2: usb_serial_generic_write_bulk_callback - nonzero urb
>> status: -110
>> ftdi_sio ttyUSB3: usb_serial_generic_write_bulk_callback - nonzero urb
>> status: -110
>> ftdi_sio ttyUSB0: usb_serial_generic_write_bulk_callback - nonzero urb
>> status: -110
>> ftdi_sio ttyUSB1: usb_serial_generic_write_bulk_callback - nonzero urb
>> status: -110
>> ftdi_sio ttyUSB2: usb_serial_generic_write_bulk_callback - nonzero urb
>> status: -110
>> ftdi_sio ttyUSB3: usb_serial_generic_write_bulk_callback - nonzero urb
>> status: -110
>>
>> After them system reboots as my watchdog time expires.
>>
>> Kernel 4.2.0-rc5
>>
>> Older FTDI chips like FT2232 have no problems. Somehow is musb really
>> allergic to FTDI and vice versa :-(
>
> That probably depends on transfer size...

Have another musb crash, when I insert TP-Link MA260. Crash log with linux-4.3.3

usb 1-1.2: new high-speed USB device number 9 using musb-hdrc
usb-storage 1-1.2:1.0: USB Mass Storage device detected
scsi host12: usb-storage 1-1.2:1.0
usb 1-1.2: USB disconnect, device number 9
usb 1-1.2: new high-speed USB device number 10 using musb-hdrc
option 1-1.2:1.0: GSM modem (1-port) converter detected
usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.2:1.1: GSM modem (1-port) converter detected
usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
usb-storage 1-1.2:1.2: USB Mass Storage device detected
scsi host13: usb-storage 1-1.2:1.2
option 1-1.2:1.3: GSM modem (1-port) converter detected
usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
qmi_wwan 1-1.2:1.4: cdc-wdm0: USB WDM device
qmi_wwan 1-1.2:1.4 wwan0: register 'qmi_wwan' at
usb-musb-hdrc.0.auto-1.2, WWAN/QMI device, 26:ff:72:84:92:10
scsi 13:0:0:0: CD-ROM            TP-LINK  MMC Storage      2.31 PQ: 0 ANSI: 2
scsi 13:0:0:1: Direct-Access     TP-LINK  MMC Storage      2.31 PQ: 0 ANSI: 2
sd 13:0:0:1: [sda] Attached SCSI removable disk

#
#
# m------------[ cut here ]------------
WARNING: CPU: 0 PID: 897 at drivers/usb/musb/musb_host.c:128
musb_h_tx_flush_fifo+0xc4/0xe4()
Could not flush host TX2 fifo: csr: 2403
Modules linked in: musb_dsps musb_am335x
CPU: 0 PID: 897 Comm: ModemManager Not tainted 4.3.3 #1
Hardware name: Generic AM33XX (Flattened Device Tree)
[<c0017bfc>] (unwind_backtrace) from [<c0013f3c>] (show_stack+0x10/0x14)
[<c0013f3c>] (show_stack) from [<c02b247c>] (dump_stack+0x84/0x9c)
[<c02b247c>] (dump_stack) from [<c003db70>] (warn_slowpath_common+0x7c/0xb8)
[<c003db70>] (warn_slowpath_common) from [<c003dbdc>]
(warn_slowpath_fmt+0x30/0x40)
[<c003dbdc>] (warn_slowpath_fmt) from [<c0412a54>]
(musb_h_tx_flush_fifo+0xc4/0xe4)
[<c0412a54>] (musb_h_tx_flush_fifo) from [<c0413e78>]
(musb_cleanup_urb+0xbc/0x130)
[<c0413e78>] (musb_cleanup_urb) from [<c04144f4>] (musb_urb_dequeue+0xf0/0x128)
[<c04144f4>] (musb_urb_dequeue) from [<c03e3544>] (usb_hcd_unlink_urb+0x50/0x84)
[<c03e3544>] (usb_hcd_unlink_urb) from [<c03e4788>] (usb_kill_urb+0x4c/0xc4)
[<c03e4788>] (usb_kill_urb) from [<c040e794>] (usb_wwan_close+0xbc/0xf0)
[<c040e794>] (usb_wwan_close) from [<c030cbb4>] (tty_port_shutdown+0x90/0x9c)
[<c030cbb4>] (tty_port_shutdown) from [<c030d2f8>] (tty_port_close+0x24/0x4c)
[<c030d2f8>] (tty_port_close) from [<c0304d9c>] (tty_release+0xec/0x4b8)
[<c0304d9c>] (tty_release) from [<c0145b74>] (__fput+0x80/0x1d0)
[<c0145b74>] (__fput) from [<c005c24c>] (task_work_run+0x8c/0xc0)
[<c005c24c>] (task_work_run) from [<c0013904>] (do_work_pending+0x8c/0xb4)
[<c0013904>] (do_work_pending) from [<c000f7e8>] (slow_work_pending+0xc/0x20)
---[ end trace 951f2d08e0a22b2a ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 897 at drivers/usb/musb/musb_host.c:128
musb_h_tx_flush_fifo+0xc4/0xe4()
Could not flush host TX2 fifo: csr: 2403
Modules linked in: musb_dsps musb_am335x
CPU: 0 PID: 897 Comm: ModemManager Tainted: G        W       4.3.3 #1
Hardware name: Generic AM33XX (Flattened Device Tree)
[<c0017bfc>] (unwind_backtrace) from [<c0013f3c>] (show_stack+0x10/0x14)
[<c0013f3c>] (show_stack) from [<c02b247c>] (dump_stack+0x84/0x9c)
[<c02b247c>] (dump_stack) from [<c003db70>] (warn_slowpath_common+0x7c/0xb8)
[<c003db70>] (warn_slowpath_common) from [<c003dbdc>]
(warn_slowpath_fmt+0x30/0x40)
[<c003dbdc>] (warn_slowpath_fmt) from [<c0412a54>]
(musb_h_tx_flush_fifo+0xc4/0xe4)
[<c0412a54>] (musb_h_tx_flush_fifo) from [<c04137b8>]
(musb_start_urb+0x970/0xd24)
[<c04137b8>] (musb_start_urb) from [<c0413e5c>] (musb_cleanup_urb+0xa0/0x130)
[<c0413e5c>] (musb_cleanup_urb) from [<c04144f4>] (musb_urb_dequeue+0xf0/0x128)
[<c04144f4>] (musb_urb_dequeue) from [<c03e3544>] (usb_hcd_unlink_urb+0x50/0x84)
[<c03e3544>] (usb_hcd_unlink_urb) from [<c03e4788>] (usb_kill_urb+0x4c/0xc4)
[<c03e4788>] (usb_kill_urb) from [<c040e794>] (usb_wwan_close+0xbc/0xf0)
[<c040e794>] (usb_wwan_close) from [<c030cbb4>] (tty_port_shutdown+0x90/0x9c)
[<c030cbb4>] (tty_port_shutdown) from [<c030d2f8>] (tty_port_close+0x24/0x4c)
[<c030d2f8>] (tty_port_close) from [<c0304d9c>] (tty_release+0xec/0x4b8)
[<c0304d9c>] (tty_release) from [<c0145b74>] (__fput+0x80/0x1d0)
[<c0145b74>] (__fput) from [<c005c24c>] (task_work_run+0x8c/0xc0)
[<c005c24c>] (task_work_run) from [<c0013904>] (do_work_pending+0x8c/0xb4)
[<c0013904>] (do_work_pending) from [<c000f7e8>] (slow_work_pending+0xc/0x20)
---[ end trace 951f2d08e0a22b2b ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 897 at drivers/usb/musb/musb_host.c:128
musb_h_tx_flush_fifo+0xc4/0xe4()
Could not flush host TX2 fifo: csr: 2403
Modules linked in: musb_dsps musb_am335x
CPU: 0 PID: 897 Comm: ModemManager Tainted: G        W       4.3.3 #1
Hardware name: Generic AM33XX (Flattened Device Tree)
[<c0017bfc>] (unwind_backtrace) from [<c0013f3c>] (show_stack+0x10/0x14)
[<c0013f3c>] (show_stack) from [<c02b247c>] (dump_stack+0x84/0x9c)
[<c02b247c>] (dump_stack) from [<c003db70>] (warn_slowpath_common+0x7c/0xb8)
[<c003db70>] (warn_slowpath_common) from [<c003dbdc>]
(warn_slowpath_fmt+0x30/0x40)
[<c003dbdc>] (warn_slowpath_fmt) from [<c0412a54>]
(musb_h_tx_flush_fifo+0xc4/0xe4)
[<c0412a54>] (musb_h_tx_flush_fifo) from [<c0413e78>]
(musb_cleanup_urb+0xbc/0x130)
[<c0413e78>] (musb_cleanup_urb) from [<c04144f4>] (musb_urb_dequeue+0xf0/0x128)
[<c04144f4>] (musb_urb_dequeue) from [<c03e3544>] (usb_hcd_unlink_urb+0x50/0x84)
[<c03e3544>] (usb_hcd_unlink_urb) from [<c03e4788>] (usb_kill_urb+0x4c/0xc4)
[<c03e4788>] (usb_kill_urb) from [<c040e794>] (usb_wwan_close+0xbc/0xf0)
[<c040e794>] (usb_wwan_close) from [<c030cbb4>] (tty_port_shutdown+0x90/0x9c)
[<c030cbb4>] (tty_port_shutdown) from [<c030d2f8>] (tty_port_close+0x24/0x4c)
[<c030d2f8>] (tty_port_close) from [<c0304d9c>] (tty_release+0xec/0x4b8)
[<c0304d9c>] (tty_release) from [<c0145b74>] (__fput+0x80/0x1d0)
[<c0145b74>] (__fput) from [<c005c24c>] (task_work_run+0x8c/0xc0)
[<c005c24c>] (task_work_run) from [<c0013904>] (do_work_pending+0x8c/0xb4)
[<c0013904>] (do_work_pending) from [<c000f7e8>] (slow_work_pending+0xc/0x20)
---[ end trace 951f2d08e0a22b2c ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 897 at drivers/usb/musb/musb_host.c:128
musb_h_tx_flush_fifo+0xc4/0xe4()
Could not flush host TX2 fifo: csr: 2403
Modules linked in: musb_dsps musb_am335x
CPU: 0 PID: 897 Comm: ModemManager Tainted: G        W       4.3.3 #1
Hardware name: Generic AM33XX (Flattened Device Tree)
[<c0017bfc>] (unwind_backtrace) from [<c0013f3c>] (show_stack+0x10/0x14)
[<c0013f3c>] (show_stack) from [<c02b247c>] (dump_stack+0x84/0x9c)
[<c02b247c>] (dump_stack) from [<c003db70>] (warn_slowpath_common+0x7c/0xb8)
[<c003db70>] (warn_slowpath_common) from [<c003dbdc>]
(warn_slowpath_fmt+0x30/0x40)
[<c003dbdc>] (warn_slowpath_fmt) from [<c0412a54>]
(musb_h_tx_flush_fifo+0xc4/0xe4)
[<c0412a54>] (musb_h_tx_flush_fifo) from [<c04137b8>]
(musb_start_urb+0x970/0xd24)
[<c04137b8>] (musb_start_urb) from [<c0413e5c>] (musb_cleanup_urb+0xa0/0x130)
[<c0413e5c>] (musb_cleanup_urb) from [<c04144f4>] (musb_urb_dequeue+0xf0/0x128)
[<c04144f4>] (musb_urb_dequeue) from [<c03e3544>] (usb_hcd_unlink_urb+0x50/0x84)
[<c03e3544>] (usb_hcd_unlink_urb) from [<c03e4788>] (usb_kill_urb+0x4c/0xc4)
[<c03e4788>] (usb_kill_urb) from [<c040e794>] (usb_wwan_close+0xbc/0xf0)
[<c040e794>] (usb_wwan_close) from [<c030cbb4>] (tty_port_shutdown+0x90/0x9c)
[<c030cbb4>] (tty_port_shutdown) from [<c030d2f8>] (tty_port_close+0x24/0x4c)
[<c030d2f8>] (tty_port_close) from [<c0304d9c>] (tty_release+0xec/0x4b8)
[<c0304d9c>] (tty_release) from [<c0145b74>] (__fput+0x80/0x1d0)
[<c0145b74>] (__fput) from [<c005c24c>] (task_work_run+0x8c/0xc0)
[<c005c24c>] (task_work_run) from [<c0013904>] (do_work_pending+0x8c/0xb4)
[<c0013904>] (do_work_pending) from [<c000f7e8>] (slow_work_pending+0xc/0x20)
---[ end trace 951f2d08e0a22b2d ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 897 at drivers/usb/musb/musb_host.c:128
musb_h_tx_flush_fifo+0xc4/0xe4()
Could not flush host TX2 fifo: csr: 2403
Modules linked in: musb_dsps musb_am335x
CPU: 0 PID: 897 Comm: ModemManager Tainted: G        W       4.3.3 #1
Hardware name: Generic AM33XX (Flattened Device Tree)
[<c0017bfc>] (unwind_backtrace) from [<c0013f3c>] (show_stack+0x10/0x14)
[<c0013f3c>] (show_stack) from [<c02b247c>] (dump_stack+0x84/0x9c)
[<c02b247c>] (dump_stack) from [<c003db70>] (warn_slowpath_common+0x7c/0xb8)
[<c003db70>] (warn_slowpath_common) from [<c003dbdc>]
(warn_slowpath_fmt+0x30/0x40)
[<c003dbdc>] (warn_slowpath_fmt) from [<c0412a54>]
(musb_h_tx_flush_fifo+0xc4/0xe4)
[<c0412a54>] (musb_h_tx_flush_fifo) from [<c0413e78>]
(musb_cleanup_urb+0xbc/0x130)
[<c0413e78>] (musb_cleanup_urb) from [<c04144f4>] (musb_urb_dequeue+0xf0/0x128)
[<c04144f4>] (musb_urb_dequeue) from [<c03e3544>] (usb_hcd_unlink_urb+0x50/0x84)
[<c03e3544>] (usb_hcd_unlink_urb) from [<c03e4788>] (usb_kill_urb+0x4c/0xc4)
[<c03e4788>] (usb_kill_urb) from [<c040e794>] (usb_wwan_close+0xbc/0xf0)
[<c040e794>] (usb_wwan_close) from [<c030cbb4>] (tty_port_shutdown+0x90/0x9c)
[<c030cbb4>] (tty_port_shutdown) from [<c030d2f8>] (tty_port_close+0x24/0x4c)
[<c030d2f8>] (tty_port_close) from [<c0304d9c>] (tty_release+0xec/0x4b8)
[<c0304d9c>] (tty_release) from [<c0145b74>] (__fput+0x80/0x1d0)
[<c0145b74>] (__fput) from [<c005c24c>] (task_work_run+0x8c/0xc0)
[<c005c24c>] (task_work_run) from [<c0013904>] (do_work_pending+0x8c/0xb4)
[<c0013904>] (do_work_pending) from [<c000f7e8>] (slow_work_pending+0xc/0x20)
---[ end trace 951f2d08e0a22b2e ]---

Could you please look at this?

Thanks.

Yegor
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Felipe Balbi Dec. 30, 2015, 2:28 p.m. UTC | #2
Hi,

Yegor Yefremov <yegorslists@googlemail.com> writes:
> Hi Felipe, hi Ladislav,
>
> On Wed, Oct 14, 2015 at 1:47 AM, Ladislav Michl <ladis@linux-mips.org> wrote:
>> On Mon, Aug 31, 2015 at 03:11:58PM +0200, Yegor Yefremov wrote:
>>> Hi Felipe,
>>>
>>> On Fri, Aug 7, 2015 at 12:57 PM, Yegor Yefremov
>>> <yegorslists@googlemail.com> wrote:
>>> > On Fri, Aug 7, 2015 at 12:16 PM, Yegor Yefremov
>>> > <yegorslists@googlemail.com> wrote:
>>> >> On Thu, Aug 6, 2015 at 4:21 PM, Felipe Balbi <balbi@ti.com> wrote:
>>> >>> HI,
>>> >>>
>>> >>> On Thu, Aug 06, 2015 at 09:40:26AM +0200, Yegor Yefremov wrote:
>>> >>>> I performed a stress test with several FT4232H chips connected to a
>>> >>>
>>> >>> how many ?
>>> >>
>>> >> # lsusb -t
>>> >> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
>>> >> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
>>> >>     |__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
>>> >>         |__ Port 1: Dev 3, If 0, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 1: Dev 3, If 1, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 1: Dev 3, If 2, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 1: Dev 3, If 3, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 2: Dev 4, If 0, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 2: Dev 4, If 1, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 2: Dev 4, If 2, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 2: Dev 4, If 3, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 3: Dev 5, If 0, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 3: Dev 5, If 1, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 3: Dev 5, If 2, Class=, Driver=ftdi_sio, 480M
>>> >>         |__ Port 3: Dev 5, If 3, Class=, Driver=ftdi_sio, 480M
>>> >>
>>> >> 3 chips a 4-ports are attached.
>>> >
>>> > Warnings appear on another device (without internal hub) with only one
>>> > FT4232H too:
>>> >
>>> > # lsusb -t
>>> > /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
>>> >     |__ Port 1: Dev 2, If 0, Class=, Driver=ftdi_sio, 480M
>>> >     |__ Port 1: Dev 2, If 1, Class=, Driver=ftdi_sio, 480M
>>> >     |__ Port 1: Dev 2, If 2, Class=, Driver=ftdi_sio, 480M
>>> >     |__ Port 1: Dev 2, If 3, Class=, Driver=ftdi_sio, 480M
>>> >
>>> >>>> hub, that is attached to one of the musb ports. So far the test was
>>> >>>> successful for several hours. But I've seen following warnings:
>>> >>>>
>>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>>> >>>> musb_ep_program 931: broken !rx_reinit, ep5 csr 0203
>>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>>> >>>> musb_ep_program 931: broken !rx_reinit, ep5 csr 0003
>>> >>>> musb_host_rx 1973: Rx interrupt with no errors or packet!
>>> >>>> musb_ep_program 931: broken !rx_reinit, ep7 csr 0003
>>> >>>>
>>> >>>> Is this expected behavior?
>>> >>>
>>> >>> no, that shouldn't happen, but it does and, apparently, in more than one
>>> >>> implementation. Wondering if you're running into endpoint limitation due
>>> >>> to MUSB's poor transfer scheduling for non-bulk endpoints.
>>
>> To add more:
>> kernel 4.2.0 on AM3703 musb in DMA mode with Quectel U15 modem plugged:
>> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
>>     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
>>         |__ Port 4: Dev 3, If 0, Class=Vendor Specific Class, Driver=option, 480M
>>         |__ Port 4: Dev 3, If 1, Class=Vendor Specific Class, Driver=option, 480M
>>         |__ Port 4: Dev 3, If 2, Class=Vendor Specific Class, Driver=option, 480M
>>         |__ Port 4: Dev 3, If 3, Class=Vendor Specific Class, Driver=option, 480M
>>         |__ Port 4: Dev 3, If 4, Class=Vendor Specific Class, Driver=option, 480M
>> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-omap/3p, 480M
>>
>>  musb_ep_program 931: broken !rx_reinit, ep2 csr a203
>>  musb_host_rx 1973: Rx interrupt with no errors or packet!
>>  musb_ep_program 931: broken !rx_reinit, ep5 csr a203
>>  musb_host_rx 1973: Rx interrupt with no errors or packet!
>>
>> and in both PIO and DMA mode write to device ends this way:
>>  ------------[ cut here ]------------
>>  WARNING: CPU: 0 PID: 146 at drivers/usb/musb/musb_host.c:128 musb_h_tx_flush_fifo+0x84/0xb8()
>>  Could not flush host TX2 fifo: csr: 2003
>>  Modules linked in: option usb_wwan usbserial snd_soc_omap_twl4030 cpufreq_dt snd_soc_omap_mcbsp snd_soc_omap snd_soc_twl4030 snd_pcm_dmaengine omap_aes snd_soc_core omap_sham omap_mailbox s
>>  CPU: 0 PID: 146 Comm: ModemManager Not tainted 4.2.0 #3
>>  Hardware name: Generic OMAP36xx (Flattened Device Tree)
>>  [<c0013ad4>] (unwind_backtrace) from [<c0011be8>] (show_stack+0x10/0x14)
>>  [<c0011be8>] (show_stack) from [<c003181c>] (warn_slowpath_common+0x84/0xac)
>>  [<c003181c>] (warn_slowpath_common) from [<c0031870>] (warn_slowpath_fmt+0x2c/0x3c)
>>  [<c0031870>] (warn_slowpath_fmt) from [<c02e6a64>] (musb_h_tx_flush_fifo+0x84/0xb8)
>>  [<c02e6a64>] (musb_h_tx_flush_fifo) from [<c02e7ee0>] (musb_cleanup_urb.isra.13+0xa0/0x12c)
>>  [<c02e7ee0>] (musb_cleanup_urb.isra.13) from [<c02e8060>] (musb_urb_dequeue+0xf4/0x114)
>>  [<c02e8060>] (musb_urb_dequeue) from [<c02cdda0>] (usb_hcd_unlink_urb+0x60/0x7c)
>>  [<c02cdda0>] (usb_hcd_unlink_urb) from [<c02ceb9c>] (usb_kill_urb+0x4c/0xc4)
>>  [<c02ceb9c>] (usb_kill_urb) from [<bf1638d8>] (usb_wwan_close+0x94/0xb0 [usb_wwan])
>>  [<bf1638d8>] (usb_wwan_close [usb_wwan]) from [<c025d0cc>] (tty_port_shutdown+0x7c/0x88)
>>  [<c025d0cc>] (tty_port_shutdown) from [<c025d9a0>] (tty_port_close+0x24/0x58)
>>  [<c025d9a0>] (tty_port_close) from [<c0256494>] (tty_release+0x128/0x40c)
>>  [<c0256494>] (tty_release) from [<c00c9aa0>] (__fput+0xd4/0x1a4)
>>  [<c00c9aa0>] (__fput) from [<c004937c>] (task_work_run+0x9c/0xb0)
>>  [<c004937c>] (task_work_run) from [<c0011688>] (do_work_pending+0xa0/0xb8)
>>  [<c0011688>] (do_work_pending) from [<c000e904>] (work_pending+0xc/0x20)
>>  ---[ end trace b14c1d9333664980 ]---
>>
>> and device (U15) does not work. Also any other device pluged into that hub
>> after warning is printed does not work any more (udlfb worked before).
>>
>> Just for completeness, here's a patch used:
>> --- linux-4.2/drivers/usb/serial/option.c.orig  2015-10-13 02:43:23.363254239 +0200
>> +++ linux-4.2/drivers/usb/serial/option.c       2015-10-13 02:44:24.663254239 +0200
>> @@ -1097,6 +1097,7 @@
>>         { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
>>         { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
>>         { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
>> +       { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9090)}, /* QUECTEL UC15 */
>>         { USB_DEVICE_INTERFACE_CLASS(SIERRA_VENDOR_ID, 0x68c0, 0xff),
>>           .driver_info = (kernel_ulong_t)&sierra_mc73xx_blacklist }, /* MC73xx */
>>         { USB_DEVICE_INTERFACE_CLASS(SIERRA_VENDOR_ID, 0x9041, 0xff),
>>
>>> Now I have another trouble with msub and FTDI FT4232H chip. If I start
>>> something like this on all 4 ports at 115200b/s, then pull USB cable
>>> and the system freezes:
>>>
>>> cat /dev/urandom > /dev/ttyUSB0
>>> ...
>>> cat /dev/urandom > /dev/ttyUSB3
>>>
>>> I see these messages:
>>>
>>> ftdi_sio ttyUSB3: usb_serial_generic_write_bulk_callback - nonzero urb
>>> status: -110
>>> ftdi_sio ttyUSB0: usb_serial_generic_write_bulk_callback - nonzero urb
>>> status: -110
>>> ftdi_sio ttyUSB1: usb_serial_generic_write_bulk_callback - nonzero urb
>>> status: -110
>>> ftdi_sio ttyUSB2: usb_serial_generic_write_bulk_callback - nonzero urb
>>> status: -110
>>> ftdi_sio ttyUSB3: usb_serial_generic_write_bulk_callback - nonzero urb
>>> status: -110
>>> ftdi_sio ttyUSB0: usb_serial_generic_write_bulk_callback - nonzero urb
>>> status: -110
>>> ftdi_sio ttyUSB1: usb_serial_generic_write_bulk_callback - nonzero urb
>>> status: -110
>>> ftdi_sio ttyUSB2: usb_serial_generic_write_bulk_callback - nonzero urb
>>> status: -110
>>> ftdi_sio ttyUSB3: usb_serial_generic_write_bulk_callback - nonzero urb
>>> status: -110
>>>
>>> After them system reboots as my watchdog time expires.
>>>
>>> Kernel 4.2.0-rc5
>>>
>>> Older FTDI chips like FT2232 have no problems. Somehow is musb really
>>> allergic to FTDI and vice versa :-(
>>
>> That probably depends on transfer size...
>
> Have another musb crash, when I insert TP-Link MA260. Crash log with linux-4.3.3
>
> usb 1-1.2: new high-speed USB device number 9 using musb-hdrc
> usb-storage 1-1.2:1.0: USB Mass Storage device detected
> scsi host12: usb-storage 1-1.2:1.0
> usb 1-1.2: USB disconnect, device number 9
> usb 1-1.2: new high-speed USB device number 10 using musb-hdrc
> option 1-1.2:1.0: GSM modem (1-port) converter detected
> usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
> option 1-1.2:1.1: GSM modem (1-port) converter detected
> usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
> usb-storage 1-1.2:1.2: USB Mass Storage device detected
> scsi host13: usb-storage 1-1.2:1.2
> option 1-1.2:1.3: GSM modem (1-port) converter detected
> usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
> qmi_wwan 1-1.2:1.4: cdc-wdm0: USB WDM device
> qmi_wwan 1-1.2:1.4 wwan0: register 'qmi_wwan' at
> usb-musb-hdrc.0.auto-1.2, WWAN/QMI device, 26:ff:72:84:92:10
> scsi 13:0:0:0: CD-ROM            TP-LINK  MMC Storage      2.31 PQ: 0 ANSI: 2
> scsi 13:0:0:1: Direct-Access     TP-LINK  MMC Storage      2.31 PQ: 0 ANSI: 2
> sd 13:0:0:1: [sda] Attached SCSI removable disk
>
> #
> #
> # m------------[ cut here ]------------
> WARNING: CPU: 0 PID: 897 at drivers/usb/musb/musb_host.c:128
> musb_h_tx_flush_fifo+0xc4/0xe4()
> Could not flush host TX2 fifo: csr: 2403
> Modules linked in: musb_dsps musb_am335x
> CPU: 0 PID: 897 Comm: ModemManager Not tainted 4.3.3 #1
> Hardware name: Generic AM33XX (Flattened Device Tree)
> [<c0017bfc>] (unwind_backtrace) from [<c0013f3c>] (show_stack+0x10/0x14)
> [<c0013f3c>] (show_stack) from [<c02b247c>] (dump_stack+0x84/0x9c)
> [<c02b247c>] (dump_stack) from [<c003db70>] (warn_slowpath_common+0x7c/0xb8)
> [<c003db70>] (warn_slowpath_common) from [<c003dbdc>]
> (warn_slowpath_fmt+0x30/0x40)
> [<c003dbdc>] (warn_slowpath_fmt) from [<c0412a54>]
> (musb_h_tx_flush_fifo+0xc4/0xe4)
> [<c0412a54>] (musb_h_tx_flush_fifo) from [<c0413e78>]
> (musb_cleanup_urb+0xbc/0x130)
> [<c0413e78>] (musb_cleanup_urb) from [<c04144f4>] (musb_urb_dequeue+0xf0/0x128)
> [<c04144f4>] (musb_urb_dequeue) from [<c03e3544>] (usb_hcd_unlink_urb+0x50/0x84)
> [<c03e3544>] (usb_hcd_unlink_urb) from [<c03e4788>] (usb_kill_urb+0x4c/0xc4)
> [<c03e4788>] (usb_kill_urb) from [<c040e794>] (usb_wwan_close+0xbc/0xf0)
> [<c040e794>] (usb_wwan_close) from [<c030cbb4>] (tty_port_shutdown+0x90/0x9c)
> [<c030cbb4>] (tty_port_shutdown) from [<c030d2f8>] (tty_port_close+0x24/0x4c)
> [<c030d2f8>] (tty_port_close) from [<c0304d9c>] (tty_release+0xec/0x4b8)
> [<c0304d9c>] (tty_release) from [<c0145b74>] (__fput+0x80/0x1d0)
> [<c0145b74>] (__fput) from [<c005c24c>] (task_work_run+0x8c/0xc0)
> [<c005c24c>] (task_work_run) from [<c0013904>] (do_work_pending+0x8c/0xb4)
> [<c0013904>] (do_work_pending) from [<c000f7e8>] (slow_work_pending+0xc/0x20)
> ---[ end trace 951f2d08e0a22b2a ]---
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 897 at drivers/usb/musb/musb_host.c:128
> musb_h_tx_flush_fifo+0xc4/0xe4()
> Could not flush host TX2 fifo: csr: 2403
> Modules linked in: musb_dsps musb_am335x
> CPU: 0 PID: 897 Comm: ModemManager Tainted: G        W       4.3.3 #1
> Hardware name: Generic AM33XX (Flattened Device Tree)
> [<c0017bfc>] (unwind_backtrace) from [<c0013f3c>] (show_stack+0x10/0x14)
> [<c0013f3c>] (show_stack) from [<c02b247c>] (dump_stack+0x84/0x9c)
> [<c02b247c>] (dump_stack) from [<c003db70>] (warn_slowpath_common+0x7c/0xb8)
> [<c003db70>] (warn_slowpath_common) from [<c003dbdc>]
> (warn_slowpath_fmt+0x30/0x40)
> [<c003dbdc>] (warn_slowpath_fmt) from [<c0412a54>]
> (musb_h_tx_flush_fifo+0xc4/0xe4)
> [<c0412a54>] (musb_h_tx_flush_fifo) from [<c04137b8>]
> (musb_start_urb+0x970/0xd24)
> [<c04137b8>] (musb_start_urb) from [<c0413e5c>] (musb_cleanup_urb+0xa0/0x130)
> [<c0413e5c>] (musb_cleanup_urb) from [<c04144f4>] (musb_urb_dequeue+0xf0/0x128)
> [<c04144f4>] (musb_urb_dequeue) from [<c03e3544>] (usb_hcd_unlink_urb+0x50/0x84)
> [<c03e3544>] (usb_hcd_unlink_urb) from [<c03e4788>] (usb_kill_urb+0x4c/0xc4)
> [<c03e4788>] (usb_kill_urb) from [<c040e794>] (usb_wwan_close+0xbc/0xf0)
> [<c040e794>] (usb_wwan_close) from [<c030cbb4>] (tty_port_shutdown+0x90/0x9c)
> [<c030cbb4>] (tty_port_shutdown) from [<c030d2f8>] (tty_port_close+0x24/0x4c)
> [<c030d2f8>] (tty_port_close) from [<c0304d9c>] (tty_release+0xec/0x4b8)
> [<c0304d9c>] (tty_release) from [<c0145b74>] (__fput+0x80/0x1d0)
> [<c0145b74>] (__fput) from [<c005c24c>] (task_work_run+0x8c/0xc0)
> [<c005c24c>] (task_work_run) from [<c0013904>] (do_work_pending+0x8c/0xb4)
> [<c0013904>] (do_work_pending) from [<c000f7e8>] (slow_work_pending+0xc/0x20)
> ---[ end trace 951f2d08e0a22b2b ]---
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 897 at drivers/usb/musb/musb_host.c:128
> musb_h_tx_flush_fifo+0xc4/0xe4()
> Could not flush host TX2 fifo: csr: 2403
> Modules linked in: musb_dsps musb_am335x
> CPU: 0 PID: 897 Comm: ModemManager Tainted: G        W       4.3.3 #1
> Hardware name: Generic AM33XX (Flattened Device Tree)
> [<c0017bfc>] (unwind_backtrace) from [<c0013f3c>] (show_stack+0x10/0x14)
> [<c0013f3c>] (show_stack) from [<c02b247c>] (dump_stack+0x84/0x9c)
> [<c02b247c>] (dump_stack) from [<c003db70>] (warn_slowpath_common+0x7c/0xb8)
> [<c003db70>] (warn_slowpath_common) from [<c003dbdc>]
> (warn_slowpath_fmt+0x30/0x40)
> [<c003dbdc>] (warn_slowpath_fmt) from [<c0412a54>]
> (musb_h_tx_flush_fifo+0xc4/0xe4)
> [<c0412a54>] (musb_h_tx_flush_fifo) from [<c0413e78>]
> (musb_cleanup_urb+0xbc/0x130)
> [<c0413e78>] (musb_cleanup_urb) from [<c04144f4>] (musb_urb_dequeue+0xf0/0x128)
> [<c04144f4>] (musb_urb_dequeue) from [<c03e3544>] (usb_hcd_unlink_urb+0x50/0x84)
> [<c03e3544>] (usb_hcd_unlink_urb) from [<c03e4788>] (usb_kill_urb+0x4c/0xc4)
> [<c03e4788>] (usb_kill_urb) from [<c040e794>] (usb_wwan_close+0xbc/0xf0)
> [<c040e794>] (usb_wwan_close) from [<c030cbb4>] (tty_port_shutdown+0x90/0x9c)
> [<c030cbb4>] (tty_port_shutdown) from [<c030d2f8>] (tty_port_close+0x24/0x4c)
> [<c030d2f8>] (tty_port_close) from [<c0304d9c>] (tty_release+0xec/0x4b8)
> [<c0304d9c>] (tty_release) from [<c0145b74>] (__fput+0x80/0x1d0)
> [<c0145b74>] (__fput) from [<c005c24c>] (task_work_run+0x8c/0xc0)
> [<c005c24c>] (task_work_run) from [<c0013904>] (do_work_pending+0x8c/0xb4)
> [<c0013904>] (do_work_pending) from [<c000f7e8>] (slow_work_pending+0xc/0x20)
> ---[ end trace 951f2d08e0a22b2c ]---
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 897 at drivers/usb/musb/musb_host.c:128
> musb_h_tx_flush_fifo+0xc4/0xe4()
> Could not flush host TX2 fifo: csr: 2403
> Modules linked in: musb_dsps musb_am335x
> CPU: 0 PID: 897 Comm: ModemManager Tainted: G        W       4.3.3 #1
> Hardware name: Generic AM33XX (Flattened Device Tree)
> [<c0017bfc>] (unwind_backtrace) from [<c0013f3c>] (show_stack+0x10/0x14)
> [<c0013f3c>] (show_stack) from [<c02b247c>] (dump_stack+0x84/0x9c)
> [<c02b247c>] (dump_stack) from [<c003db70>] (warn_slowpath_common+0x7c/0xb8)
> [<c003db70>] (warn_slowpath_common) from [<c003dbdc>]
> (warn_slowpath_fmt+0x30/0x40)
> [<c003dbdc>] (warn_slowpath_fmt) from [<c0412a54>]
> (musb_h_tx_flush_fifo+0xc4/0xe4)
> [<c0412a54>] (musb_h_tx_flush_fifo) from [<c04137b8>]
> (musb_start_urb+0x970/0xd24)
> [<c04137b8>] (musb_start_urb) from [<c0413e5c>] (musb_cleanup_urb+0xa0/0x130)
> [<c0413e5c>] (musb_cleanup_urb) from [<c04144f4>] (musb_urb_dequeue+0xf0/0x128)
> [<c04144f4>] (musb_urb_dequeue) from [<c03e3544>] (usb_hcd_unlink_urb+0x50/0x84)
> [<c03e3544>] (usb_hcd_unlink_urb) from [<c03e4788>] (usb_kill_urb+0x4c/0xc4)
> [<c03e4788>] (usb_kill_urb) from [<c040e794>] (usb_wwan_close+0xbc/0xf0)
> [<c040e794>] (usb_wwan_close) from [<c030cbb4>] (tty_port_shutdown+0x90/0x9c)
> [<c030cbb4>] (tty_port_shutdown) from [<c030d2f8>] (tty_port_close+0x24/0x4c)
> [<c030d2f8>] (tty_port_close) from [<c0304d9c>] (tty_release+0xec/0x4b8)
> [<c0304d9c>] (tty_release) from [<c0145b74>] (__fput+0x80/0x1d0)
> [<c0145b74>] (__fput) from [<c005c24c>] (task_work_run+0x8c/0xc0)
> [<c005c24c>] (task_work_run) from [<c0013904>] (do_work_pending+0x8c/0xb4)
> [<c0013904>] (do_work_pending) from [<c000f7e8>] (slow_work_pending+0xc/0x20)
> ---[ end trace 951f2d08e0a22b2d ]---
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 897 at drivers/usb/musb/musb_host.c:128
> musb_h_tx_flush_fifo+0xc4/0xe4()
> Could not flush host TX2 fifo: csr: 2403
> Modules linked in: musb_dsps musb_am335x
> CPU: 0 PID: 897 Comm: ModemManager Tainted: G        W       4.3.3 #1
> Hardware name: Generic AM33XX (Flattened Device Tree)
> [<c0017bfc>] (unwind_backtrace) from [<c0013f3c>] (show_stack+0x10/0x14)
> [<c0013f3c>] (show_stack) from [<c02b247c>] (dump_stack+0x84/0x9c)
> [<c02b247c>] (dump_stack) from [<c003db70>] (warn_slowpath_common+0x7c/0xb8)
> [<c003db70>] (warn_slowpath_common) from [<c003dbdc>]
> (warn_slowpath_fmt+0x30/0x40)
> [<c003dbdc>] (warn_slowpath_fmt) from [<c0412a54>]
> (musb_h_tx_flush_fifo+0xc4/0xe4)
> [<c0412a54>] (musb_h_tx_flush_fifo) from [<c0413e78>]
> (musb_cleanup_urb+0xbc/0x130)
> [<c0413e78>] (musb_cleanup_urb) from [<c04144f4>] (musb_urb_dequeue+0xf0/0x128)
> [<c04144f4>] (musb_urb_dequeue) from [<c03e3544>] (usb_hcd_unlink_urb+0x50/0x84)
> [<c03e3544>] (usb_hcd_unlink_urb) from [<c03e4788>] (usb_kill_urb+0x4c/0xc4)
> [<c03e4788>] (usb_kill_urb) from [<c040e794>] (usb_wwan_close+0xbc/0xf0)
> [<c040e794>] (usb_wwan_close) from [<c030cbb4>] (tty_port_shutdown+0x90/0x9c)
> [<c030cbb4>] (tty_port_shutdown) from [<c030d2f8>] (tty_port_close+0x24/0x4c)
> [<c030d2f8>] (tty_port_close) from [<c0304d9c>] (tty_release+0xec/0x4b8)
> [<c0304d9c>] (tty_release) from [<c0145b74>] (__fput+0x80/0x1d0)
> [<c0145b74>] (__fput) from [<c005c24c>] (task_work_run+0x8c/0xc0)
> [<c005c24c>] (task_work_run) from [<c0013904>] (do_work_pending+0x8c/0xb4)
> [<c0013904>] (do_work_pending) from [<c000f7e8>] (slow_work_pending+0xc/0x20)
> ---[ end trace 951f2d08e0a22b2e ]---
>
> Could you please look at this?

IIRC, Bin and I had a lengthy discussion about these WARNs on
MUSB. MUSB's documents aren't very helpful when discussing FIFO
flush. There's some ambiguity there; This seems to be easier to
reproduce with interrupt endpoints since that's also what Bin pointed
to.

In any case, I think there might be something we could do to make this
slightly better. I'll see what I can do for v4.5-rc
Ladislav Michl Jan. 27, 2016, 10:01 a.m. UTC | #3
Hi Felipe,

On Wed, Dec 30, 2015 at 08:28:33AM -0600, Felipe Balbi wrote:
> IIRC, Bin and I had a lengthy discussion about these WARNs on
> MUSB. MUSB's documents aren't very helpful when discussing FIFO
> flush. There's some ambiguity there; This seems to be easier to
> reproduce with interrupt endpoints since that's also what Bin pointed
> to.

Is there anything I could debug to move things forward?

> In any case, I think there might be something we could do to make this
> slightly better. I'll see what I can do for v4.5-rc

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)...

regards,
	ladis
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yegor Yefremov March 14, 2016, 10:25 a.m. UTC | #4
Hi Bin,

On Wed, Jan 27, 2016 at 11:01 AM, Ladislav Michl <ladis@linux-mips.org> wrote:
> Hi Felipe,
>
> On Wed, Dec 30, 2015 at 08:28:33AM -0600, Felipe Balbi wrote:
>> IIRC, Bin and I had a lengthy discussion about these WARNs on
>> MUSB. MUSB's documents aren't very helpful when discussing FIFO
>> flush. There's some ambiguity there; This seems to be easier to
>> reproduce with interrupt endpoints since that's also what Bin pointed
>> to.
>
> Is there anything I could debug to move things forward?
>
>> In any case, I think there might be something we could do to make this
>> slightly better. I'll see what I can do for v4.5-rc
>
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ladislav Michl March 14, 2016, 12:11 p.m. UTC | #5
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@linux-mips.org> 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 ...

Best regards,
	ladis
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yegor Yefremov March 14, 2016, 1:40 p.m. UTC | #6
On Mon, Mar 14, 2016 at 1:11 PM, Ladislav Michl <ladis@linux-mips.org> 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@linux-mips.org> 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:

USB_MUSB_HDRC [=y]
USB_MUSB_DUAL_ROLE [=y]
USB_MUSB_DSPS [=m]
USB_TI_CPPI41_DMA [=y]

# usb 1-1.3: new high-speed USB device number 3 using musb-hdrc
option 1-1.3:1.0: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.3:1.1: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1.3:1.2: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
option 1-1.3:1.3: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
option 1-1.3:1.4: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB4
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, be:61:b2:fb:3b:34
------------[ cut here ]------------
WARNING: CPU: 0 PID: 904 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 TX3 fifo: csr: 2403
Modules linked in: musb_dsps musb_am335x
CPU: 0 PID: 904 Comm: ModemManager Not tainted 4.5.0 #1
Hardware name: Generic AM33XX (Flattened Device Tree)
[<c0017ecc>] (unwind_backtrace) from [<c0014104>] (show_stack+0x10/0x14)
[<c0014104>] (show_stack) from [<c02cad84>] (dump_stack+0xb0/0xe4)
[<c02cad84>] (dump_stack) from [<c003be6c>] (warn_slowpath_common+0x7c/0xb8)
[<c003be6c>] (warn_slowpath_common) from [<c003bed8>]
(warn_slowpath_fmt+0x30/0x40)
[<c003bed8>] (warn_slowpath_fmt) from [<c043648c>]
(musb_h_tx_flush_fifo+0xc4/0xe4)
[<c043648c>] (musb_h_tx_flush_fifo) from [<c04375d0>]
(musb_cleanup_urb+0xbc/0x130)
[<c04375d0>] (musb_cleanup_urb) from [<c0437c80>] (musb_urb_dequeue+0xf0/0x128)
[<c0437c80>] (musb_urb_dequeue) from [<c0406894>] (usb_hcd_unlink_urb+0x50/0x84)
[<c0406894>] (usb_hcd_unlink_urb) from [<c0407ad8>] (usb_kill_urb+0x4c/0xc4)
[<c0407ad8>] (usb_kill_urb) from [<c0431e84>] (usb_wwan_close+0xbc/0xf0)
[<c0431e84>] (usb_wwan_close) from [<c0328644>] (tty_port_shutdown+0x90/0x9c)
[<c0328644>] (tty_port_shutdown) from [<c0328d34>] (tty_port_close+0x24/0x4c)
[<c0328d34>] (tty_port_close) from [<c0320c88>] (tty_release+0xec/0x474)
[<c0320c88>] (tty_release) from [<c0151734>] (__fput+0x80/0x1d0)
[<c0151734>] (__fput) from [<c005af34>] (task_work_run+0x90/0xc4)
[<c005af34>] (task_work_run) from [<c0013ac8>] (do_work_pending+0x8c/0xb4)
[<c0013ac8>] (do_work_pending) from [<c000f8e8>] (slow_work_pending+0xc/0x20)
---[ end trace 8db49db5910fde5c ]---
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bin Liu March 14, 2016, 2:01 p.m. UTC | #7
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@linux-mips.org> 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@linux-mips.org> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- linux-4.2/drivers/usb/serial/option.c.orig	2015-10-13 02:43:23.363254239 +0200
+++ linux-4.2/drivers/usb/serial/option.c	2015-10-13 02:44:24.663254239 +0200
@@ -1097,6 +1097,7 @@ 
 	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
 	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
 	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
+	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9090)}, /* QUECTEL UC15 */
 	{ USB_DEVICE_INTERFACE_CLASS(SIERRA_VENDOR_ID, 0x68c0, 0xff),
 	  .driver_info = (kernel_ulong_t)&sierra_mc73xx_blacklist }, /* MC73xx */
 	{ USB_DEVICE_INTERFACE_CLASS(SIERRA_VENDOR_ID, 0x9041, 0xff),