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.

usb power management (idle) and the device resume error

Other Parts Discussed in Thread: DM3730

Hi,

My hardware: omap3evm board with DM3730

Software: android gingerbread with kernel 2.6.37 

I plug in high speed usb device into ehci host usb. Then I turn on idle mode (/debug/pm_debug/sleep_while_idle 1 and /debug/pm_debug/enable_off_mode 1). The device modules are loaded and it works fine.  I want to test usb host power management so next step is:

 echo auto > /sys/bus/usb/devices/usb1/power/level       so the kernel is allowed to autosuspend and autoresume the device.

In the device driver there is also usb_enable_autosuspend(..) so it is also allowed.

It looks ok but after some usb operations for example some usb transfers I can see that in log:

[ 286.073822] ehci-omap ehci-omap.0: port 2 resume error -110
[ 286.079711] hub 1-0:1.0: hub_port_status failed (err = -32)
[ 286.126007] usb 1-2: USB disconnect, address 2
[ 286.132537] sierra ttyUSB0: Sierra USB modem converter now disconnected from ttyUSB0
[ 286.141815] sierra 1-2:1.0: device disconnected
[ 286.149200] sierra ttyUSB1: Sierra USB modem converter now disconnected from ttyUSB1
[ 286.158325] sierra 1-2:1.1: device disconnected
[ 286.175659] sierra ttyUSB2: Sierra USB modem converter now disconnected from ttyUSB2
[ 286.188385] sierra 1-2:1.3: device disconnected
[ 286.197418] sierra_net 1-2:1.7: wwan0: unregister 'sierra_net' usb-ehci-omap.0-2, Sierra Wireless USB-to-WWAN Modem
[ 286.220672] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.226287] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.231903] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.237518] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.243133] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.248718] hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
[ 286.256072] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.261657] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.267272] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.272857] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.278472] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.284057] hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
[ 286.291412] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.296997] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.302612] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.308197] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.313812] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.319396] hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
[ 286.326721] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.332336] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.337951] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.343536] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.349121] hub 1-0:1.0: cannot reset port 2 (err = -32)
[ 286.354736] hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
[ 286.362060] ehci-omap ehci-omap.0: port 2 cannot be enabled
[ 286.367919] ehci-omap ehci-omap.0: Maybe your device is not a high speed device?
[ 286.375671] ehci-omap ehci-omap.0: USB host (EHCI) controller does not support full speed or low speed device on it's root port.
[ 286.387817] ehci-omap ehci-omap.0: Please connect full/low speed device via a high speed hub.
[ 286.396759] hub 1-0:1.0: unable to enumerate USB device on port 2
[ 286.405761] ehci-omap ehci-omap.0: port 2 resume error -110
[ 286.411621] hub 1-0:1.0: hub_port_status failed (err = -32)

After that usb port is lost, even pulling out the usb cable does not cause an enumeration. 

The device is high speed one and works fine when usb PM is not enabled.

Any idea how to prevent such behaviour?

Regards,

Karol