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.

Linux/AM4377: USB does not resume from suspend

Part Number: AM4377


Tool/software: Linux

Hi sir,

Our board need to do suspend/resume test for usb2.0 mass storage device.My device can be suspended while I fellow this command

"echo auto > /sys/devices/platform/44000000.ocp/48380000.omap_dwc3/48390000.usb/power/control",the U disk can be suspended,and I can capture the corrrect signal on tne oscilloscope.

But the device can't be resume when "echo on > /sys/devices/platform/44000000.ocp/48380000.omap_dwc3/48390000.usb/power/control",Then  I unplugged the usb device and replugged it,it was still suspending

rather than waking up.

My sdk version is 04.03.00.05.Kernel version is 4.9.69

Could you help me  solve this problem?

Thanks.

beate.

  • Hi Beate,

    The procedure you did has two problems.

    1. Please don't modify the power entries for 'xxxxxxxx.omap_dwc3/xxxxxxxx.usb', that is for the usb controllers, not the usb bus.

    2. Using a usb thumb drive to do this test is not a good idea, Linux has a complex driver stack to use mass storage, so it is not that clear how to control the bus suspend/resume with a thumb drive. Better to use a usb mouse or keyboard (with no built-in hub).

    How to run the test:

    1. Check the mouse enumeration log to find the usb device node. For example,

    [  723.302429] usb 1-1: new low-speed USB device number 4 using xhci-hcd
    [  723.501709] input: Logitech Optical USB Mouse as /devices/platform/44000000.ocp/483c0000.omap_dwc3/483d0000.usb/xhci-hcd.3.auto/usb1/1-1/1-1:1.0/0003:046D:C016.0002/input/input3
    [  723.520938] hid-generic 0003:046D:C016.0002: input: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-xhci-hcd.3.auto-1/input0
    

    the log shows the mouse is enumerated as '1-1'.

    2. go to the sysfs entry of usb device '1-1':

    cd /sys/bus/usb/devices/1-1/power
    

    3. now control and check the usb bus suspend/resume:

    root@am437x-evm:power# cat autosuspend
    2
    root@am437x-evm:power# cat control 
    on
    root@am437x-evm:power# cat runtime_status 
    active
    root@am437x-evm:power# echo auto > control 
    root@am437x-evm:power# cat runtime_status 
    suspended
    root@am437x-evm:power# echo on > control 
    root@am437x-evm:power# cat runtime_status 
    active
    
  • Hi Beate,

    I haven’t heard back from you, I’m assuming you were able to resolve your issue. If not, just post a reply below (or create a new thread if the thread has locked due to time-out). thanks.
  • Hi Bin,
    Sorry to forget to reply you,the issue has been resolved,Thanks for your help.
  • Beate,

    Glad the issue is solved. Thanks for the update.