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.

Problem with web camera (uvcvideo)

Other Parts Discussed in Thread: AM3517, AM3505

Hello. I need to use USB Web camera with TI AM3505 and TI AM3517 with usb3220 transiver . I
use kernel 2.6.37 from arago. I test it, its work but sometimes I have
problems, that other users see in other TI CPU:
http://thread.gmane.org/gmane.linux.ports.arm.omap/35912/focus=36095
Sometimes camera do not work after 10-15 min of working. This is dmesg
(when this bug is reproduced) (I do not disconnect web camera but
linux think so(?)):
[   53.696228] ehci-omap ehci-omap.0: remove, state 1
[   53.696258] usb usb1: USB disconnect, address 1
[   53.696350] usb 1-1: USB disconnect, address 2
[   53.696350] usb 1-1.4: USB disconnect, address 3
[   53.773498] ehci-omap ehci-omap.0: force halt; handshake fa064814
0000c000 00000000 -> -110
[   54.113677] ehci-omap ehci-omap.0: USB bus 1 deregistered
[   54.524505] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   54.524658] ehci-omap.0 supply hsusb0 not found, using dummy regulator
[   55.532257] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
[   55.532318] ehci-omap ehci-omap.0: new USB bus registered, assigned
bus number 1
[   55.540313] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
[   55.555725] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
[   55.555877] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   55.555877] usb usb1: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[   55.555908] usb usb1: Product: OMAP-EHCI Host Controller
[   55.555908] usb usb1: Manufacturer: Linux 2.6.37-svn1014 ehci_hcd
[   55.555938] usb usb1: SerialNumber: ehci-omap.0
And camera and other USB devices do not work until reboot.
I test it with various web cameras, with and without USB hub with
external power. This bug is exists.

  • Andrei,

    Can you send the full log starting from boot?

    Ajay

  • Thank you for answer.

    This is dmesg: http://pastebin.com/XK0yLx6S

    Problem is reproduced around 290 sec of kernel work.

  • Andrei,

    I can see a watchdog related activity just before the issue is seen. I also see "Failed to set UVC probe control" which is indicating that command sent to camera failed and the error number "-110" is connection timed out.

    --------------------------------------------------------------------------------------------------------

    1. [   15.799468] omap_device: omap_wdt.-1: new worst case activate latency 0: 30517
    2. [   15.805328] OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
    3. [   15.805389] omap_device: omap_wdt.-1: new worst case deactivate latency 0: 30517
    4. [   16.848602] omap_device: omap_i2c.1: new worst case activate latency 0: 30517
    5. [  294.798797] uvcvideo: Failed to set UVC probe control : -110 (exp. 26).
    6. [  294.806335] ehci-omap ehci-omap.0: remove, state 1
    7. [  294.806396] usb usb1: USB disconnect, address 1
    8. [  294.806396] usb 1-1: USB disconnect, address 2
    9. [  294.806427] usb 1-1.3: USB disconnect, address 3

    -----------------------------------------------------------------------------------------------------------

    I don;t know why control command from your camera is timed out but this time out is firing a workqueue to restart controller which is added as a recovery workaround for a hardware known issue with high DSS activity. This is causing the disconnect and reconnect . Please try below change which disables this recovery workqueue,

    -------------------------------------------------------------------------------------------------

    diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
    index c816a61..2b6b8f3 100644
    --- a/drivers/usb/core/message.c
    +++ b/drivers/usb/core/message.c
    @@ -105,7 +105,7 @@ static int usb_internal_control_msg(struct usb_device *usb_dev,
                     * API usb_submit_urb() instead of usb_control_msg().
                     */
                    if (!strcmp(hcd->product_desc, "OMAP-EHCI Host Controller") &&
    -                               retv == -ETIMEDOUT && hcd->driver->recover_hcd)
    +                       0 && retv == -ETIMEDOUT && hcd->driver->recover_hcd)
                            queue_work(pm_wq, &hcd->ehci_omap_work);

                    return retv;
    -------------------------------------------------------------------------------------------------

    Ajay

  • Ajay, thank you for answer!

    >>I can see a watchdog related activity just before the issue is seen.

    First column is time. Watchdog activity just in system start and I think that its not connected with this problem.

     

    >>I don;t know why control command from your camera is timed out but this time out is firing a workqueue to restart controller which is added as a recovery workaround for a hardware known issue with high DSS activity. This is causing the disconnect and reconnect . Please try below change which disables this recovery workqueue,

    I apply this path. In rusult I see inifnity "uvcvideo: Failed to set UVC probe control : -110 (exp. 26)." after problem was reproduced. Full log: http://pastebin.com/rQr5e1FX . Problem is reproduced in ~80 sec.

  • Also some USB cameras cnat work without external USB hub. When I connected this camera I see:

    [   29.076477] hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?

    [   29.142944] ehci-omap ehci-omap.0: port 1 reset error -110

    [   29.148681] hub 1-0:1.0: hub_port_status failed (err = -32)

    [   29.361755] ehci-omap ehci-omap.0: port 1 reset error -110

    [   29.367523] hub 1-0:1.0: hub_port_status failed (err = -32)

    [   29.580505] ehci-omap ehci-omap.0: port 1 reset error -110

    [   29.586242] hub 1-0:1.0: hub_port_status failed (err = -32)

    [   29.799255] ehci-omap ehci-omap.0: port 1 reset error -110

    [   29.805023] hub 1-0:1.0: hub_port_status failed (err = -32)

    [   30.018249] ehci-omap ehci-omap.0: port 1 reset error -110

    [   30.023986] hub 1-0:1.0: hub_port_status failed (err = -32)

    [   30.029846] hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?

    [   30.037170] ehci-omap ehci-omap.0: port 1 cannot be enabled

    [   30.037170] ehci-omap ehci-omap.0: Maybe your device is not a high speed device?

    [   30.037200] ehci-omap ehci-omap.0: USB host (EHCI) controller does not support full speed or low speed device on it's root port.

    [   30.037200] ehci-omap ehci-omap.0: Please connect full/low speed device via a high speed hub.

    [   30.037231] hub 1-0:1.0: unable to enumerate USB device on port 1