Re: [RFT]patch to remove kernel thread for runtime pm from usbhid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 12, 2010 at 6:29 PM, Maulik Mankad <mankad.maulik@xxxxxxxxx> wrote:
> On Tue, Oct 12, 2010 at 8:10 PM, Oliver Neukum <oneukum@xxxxxxx> wrote:
>> Am Dienstag, 12. Oktober 2010, 14:10:42 schrieb Maulik Mankad:
>>> On Tue, Oct 12, 2010 at 5:09 PM, Oliver Neukum <oneukum@xxxxxxx> wrote:
>>
>>> > Thank you. Do both devices support remote wakeup? How much sleep time
>>> > was generated?
>>> >
>>>
>>> Reading the wakeup node (as below) shows that its enabled.
>>>
>>> cat /sys/bus/usb/devices/1-1/manufacturer
>>> Dell
>>>
>>> # cat /sys/bus/usb/devices/1-1/power/wakeup
>>> enabled
>>>
>>> My test was basically using the HID device post enumeration, and make
>>> sure that data transfers work reliably.
>>>
>>> I can test more if you provide steps as per your need.
>>
>> Very good! Please do a
>> echo "auto" >/sys/bus/usb/devices/1-1/power/level
>> and do the test. After that I'd like to have the content of
>> active_duration  connected_duration  runtime_active_time  runtime_enabled  runtime_status  runtime_suspended_time  runtime_usage  wakeup_count
>> in /sys/bus/usb/devices/1-1/power/
>
> Below are some logs from my tests. I gave below two commands to suspend the bus.
>
> (1) echo 0 > /sys/bus/usb/devices/1-1/power/autosuspend
>
> (2) echo auto > /sys/bus/usb/devices/1-1/power/control
> ==========================================
> usb usb1: usb wakeup-resume
> usb usb1: usb auto-resume
> hub 1-0:1.0: hub_resume
> hub 1-0:1.0: port 1: status 0303 change 0004
> hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
> usb 1-1: usb wakeup-resume
> usb 1-1: finish resume
> usb 1-1: usb auto-suspend
> hub 1-0:1.0: resume on port 1, status 0
> hub 1-0:1.0: port 1, status 0303, change 0004, 1.5 Mb/s
> hub 1-0:1.0: hub_suspend
> usb usb1: bus auto-suspend
> musb_bus_suspend 2311: trying to suspend as a_host while active
> usb usb1: bus suspend fail, err -16
> hub 1-0:1.0: hub_resume
> hub 1-0:1.0: port 1: status 0303 change 0004
> hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
> usb 1-1: usb wakeup-resume
> usb 1-1: finish resume
> usb 1-1: usb auto-suspend
> hub 1-0:1.0: resume on port 1, status 0
> hub 1-0:1.0: port 1, status 0303, change 0004, 1.5 Mb/s
> hub 1-0:1.0: hub_suspend
> usb usb1: bus auto-suspend
> musb_bus_suspend 2311: trying to suspend as a_host while active
> usb usb1: bus suspend fail, err -16
> hub 1-0:1.0: hub_resume
> hub 1-0:1.0: port 1: status 0303 change 0004
> hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
> usb 1-1: usb wakeup-resume
> usb 1-1: finish resume
> usb 1-1: usb auto-suspend
> hub 1-0:1.0: resume on port 1, status 0
> hub 1-0:1.0: port 1, status 0303, change 0004, 1.5 Mb/s
> ========================================================
>
> Note that the bus keeps suspending and when I press a key on the
> keyboard I see logs related to wakeup-resume.
>
> Also I see the below entries under /sys/bus/usb/devices/1-1/power/
>
>  ls /sys/bus/usb/devices/1-1/power/
> active_duration  connected_duration  level    wakeup
> autosuspend      control             persist
>
> cat /sys/bus/usb/devices/1-1/power/active_duration
> 64289
>
> cat /sys/bus/usb/devices/1-1/power/connected_duration
> 224015
>
> cat /sys/bus/usb/devices/1-1/power/persist
> 1
>
> cat /sys/bus/usb/devices/1-1/power/control
> auto
>
> I don't see the runtime entries. Any idea why is this so? I have
> applied your patch to 2.6.35 kernel where my device works.
>
> Has this something to do with the kernel version I am using / some
> option to be turned on in menuconfig?
>

Seems like the below commit added that support to sysfs.

commit 8d4b9d1bfef117862a2889dec4dac227068544c9
Author: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Date:   Mon Jul 19 02:01:06 2010 +0200

    PM / Runtime: Add runtime PM statistics (v3)

I will see if I can apply this to my kernel and provide the stats you need.

Regards,
Maulik
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux