This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3715 HOST controller crashes

Other Parts Discussed in Thread: AM3715

Hi, all:

I am working with AM3715 USB EHCI HOST. But a Linux crash occurs.

I found that , TI's BSP add a recovery mechanism, 

static void ehci_omap_recover_work(struct work_struct *data)

{

                                ehci_hcd_cleanup();

                                ehci_hcd_init();

}

when the recovery mechanism executes, the  ehci_hcd_cleanup() crashes at omap_stop_ehc() function.

I found that the hub will deregister the port and the recovery mechanism also deregister the port, is this will cause the crash?


the commit is:

Author: Ajay Kumar Gupta <ajay.gupta@ti.com>

Date:   Fri Dec 31 12:54:59 2010 +0530

usb: ehci_omap: add recovery mechanism for omap3 errata

 

                Adding recovery mechanism for OMAP3x errata advisory 3.1.1.198:

                "USB Host EHCI May Stall when Running High Peak-bandwidth

                Demanding Use Cases"

 

                The recovery mechanism would reinitialize the EHCI controller

whenever the stall scenario occurs.

  • Is the crash happened on AM37xx EVM or your custom board?

    Does the crash still happen if you reverted the patch mentioned above?

    What Linux SDK version do you use?

    Can you please provide the crash log?

  • It's my custom board.

    I reverted the patch mentioned above, It will not crash, but the Linux USB hub driver can not reset and disable the port, all the devices attatched to host controller can not work.

    Log:

    hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    ehci-omap ehci-omap.0: port 1 cannot be enabled
    ehci-omap ehci-omap.0: Maybe your device is not a high speed device?
    ehci-omap ehci-omap.0: USB host (EHCI) controller does not support full speed or low speed device on it's root port.
    ehci-omap ehci-omap.0: Please connect full/low speed device via a high speed hub.
    hub 1-0:1.0: unable to enumerate USB device on port 1
    ehci-omap ehci-omap.0: port 2 resume error -110
    hub 1-0:1.0: hub_port_status failed (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: Cannot enable port 2.  Maybe the USB cable is bad?
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: Cannot enable port 2.  Maybe the USB cable is bad?
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: Cannot enable port 2.  Maybe the USB cable is bad?
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: cannot reset port 2 (err = -32)
    hub 1-0:1.0: Cannot enable port 2.  Maybe the USB cable is bad?
    ehci-omap ehci-omap.0: port 2 cannot be enabled
    ehci-omap ehci-omap.0: Maybe your device is not a high speed device?
    ehci-omap ehci-omap.0: USB host (EHCI) controller does not support full speed or low speed device on it's root port.
    ehci-omap ehci-omap.0: Please connect full/low speed device via a high speed hub.
    hub 1-0:1.0: unable to enumerate USB device on port 2
    ehci-omap ehci-omap.0: port 2 resume error -110
    hub 1-0:1.0: hub_port_status failed (err = -32)

    Linux version is 2.6.37

    Crash Log:

    ehci-omap ehci-omap.0: remove, state 1
    usb usb1: USB disconnect, address 1
    hub 1-0:1.0: cannot reset port 2 (err = -19)
    hub 1-0:1.0: cannot disable port 2 (err = -19)
    hub 1-0:1.0: cannot reset port 2 (err = -19)
    hub 1-0:1.0: cannot disable port 2 (err = -19)
    hub 1-0:1.0: cannot reset port 2 (err = -19)
    hub 1-0:1.0: cannot disable port 2 (err = -19)
    hub 1-0:1.0: cannot reset port 2 (err = -19)
    hub 1-0:1.0: cannot disable port 2 (err = -19)
    ehci-omap ehci-omap.0: port 2 cannot be enabled
    ehci-omap ehci-omap.0: Maybe your device is not a high speed device?
    ehci-omap ehci-omap.0: USB host (EHCI) controller does not support full speed or low speed device on it's root port.
    set_charger_cur to default
    ehci-omap ehci-omap.0: Please connect full/low speed device via a high speed hub.
    hub 1-0:1.0: unable to enumerate USB device on port 2
    hub 1-0:1.0: cannot disable port 2 (err = -19)
    ehci-omap ehci-omap.0: force halt; handshake fa064814 0000c000 00000000 -> -110
    ehci-omap ehci-omap.0: USB bus 1 deregistered
    Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa064014
    Internal error: : 1028 [#1] PREEMPT
    last sysfs file: /sys/devices/platform/leds-gpio/leds/green/delay_off
    Modules linked in: omaplfb pvrsrvkm honeywell_ioctl ffxblk flashfx(P) ffxos
    CPU: 0    Tainted: P             (2.6.37 #12)
    PC is at omap_stop_ehc+0x58/0x164
    LR is at omap_stop_ehc+0x20/0x164
    pc : [<c03271bc>]    lr : [<c0327184>]    psr: 20000013
    sp : dec31e50  ip : dec31e50  fp : dec31e64
    r10: 00000001  r9 : dec02c50  r8 : ded4e4f4
    r7 : 00000000  r6 : ded4e400  r5 : c06dda28  r4 : ded46540
    r3 : c06dda28  r2 : fa064000  r1 : 83126e98  r0 : 0000000d
    Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
    Control: 10c5387d  Table: 9e088019  DAC: 00000017

     

     

     Backtrace:
    [<c0327164>] (omap_stop_ehc+0x0/0x164) from [<c0327364>] (ehci_hcd_omap_remove+0x9c/0x100)
     r5:ded46540 r4:ded46540
    [<c03272c8>] (ehci_hcd_omap_remove+0x0/0x100) from [<c02cbc6c>] (platform_drv_remove+0x20/0x24)
    r9:dec02c50 r8:ded4e498 r7:c06db7bc r6:c06f6cb0 r5:c06f6cb0
    r4:c06db788
    [<c02cbc4c>] (platform_drv_remove+0x0/0x24) from [<c02ca648>] (__device_release_driver+0x8c/0xd8)
    [<c02ca5bc>] (__device_release_driver+0x0/0xd8) from [<c02ca75c>] (driver_detach+0xc8/0xf0)
     r5:c06db788 r4:dec30000
    [<c02ca694>] (driver_detach+0x0/0xf0) from [<c02c9780>] (bus_remove_driver+0x98/0xc0)
     r7:00000000 r6:c06f4250 r5:dec24c00 r4:c06f6cb0
    [<c02c96e8>] (bus_remove_driver+0x0/0xc0) from [<c02cad34>] (driver_unregister+0x68/0x74)
     r7:00000000 r6:00000000 r5:dec24c00 r4:c06f6cb0
    [<c02caccc>] (driver_unregister+0x0/0x74) from [<c02cc074>] (platform_driver_unregister+0x14/0x18)
     r7:00000000 r6:c032b914 r5:dec24c00 r4:dec02c40
    [<c02cc060>] (platform_driver_unregister+0x0/0x18) from [<c032b8ec>] (ehci_hcd_cleanup+0x14/0x3c)
    [<c032b8d8>] (ehci_hcd_cleanup+0x0/0x3c) from [<c032b924>] (ehci_omap_recover_work+0x10/0x18)
    [<c032b914>] (ehci_omap_recover_work+0x0/0x18) from [<c00962ac>] (process_one_work+0x2e0/0x4bc)
    [<c0095fcc>] (process_one_work+0x0/0x4bc) from [<c0098478>] (worker_thread+0x24c/0x460)
    [<c009822c>] (worker_thread+0x0/0x460) from [<c009c3a4>] (kthread+0x8c/0x94)
    [<c009c318>] (kthread+0x0/0x94) from [<c0081218>] (do_exit+0x0/0x74c)
     r7:00000013 r6:c0081218 r5:c009c318 r4:dec2bee8
    Code: e5932000 ea000000 e59f3108 e594203c (e5922014)
    ---[ end trace a7ef4eaf484b2e91 ]---

  • Dear Liu:

    I found some useful information on TI's forum.

    Kernel crash(Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa062014) in ohci-omap3.c.

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/447/t/227219.aspx?pi70793=1

    I tried the patch, TI's engineer offered. but it did not wok.

    I think it's a clue for us.

  • I got the same issue here on the am37x evm board using the 2.6.37 kernel of the android sdk and a logitech C270 camera.

    After I reverted the changes of the patch mentioned above, the kernel doesn't crash anymore.