Thread (10 messages) 10 messages, 2 authors, 2014-02-20

Re: how to know how long it takes on suspend/resume for platform usb driver

From: loody <hidden>
Date: 2014-01-04 10:23:33

hi Alan:


2014/1/1 Alan Stern [off-list ref]:
On Tue, 31 Dec 2013, loody wrote:
quoted
hi all:
I am implementing platform layer suspend/resume usb driver.
Is there kernel configuration or module parameter I can used to
calculate suspend/resume time spend?
Turn on CONFIG_PM_SLEEP_DEBUG, and before starting your test, do

        echo 1 >/sys/power/pm_print_times

Alan Stern
I can see log like below:

[  252.311771] call usb2+ returned 0 after 202 usecs
[  252.311778] call usb1+ returned 0 after 239 usecs
[  252.311961] call usb3+ returned 0 after 438 usecs
.........................
[  252.884923] ehci-pci 0000:00:1d.0: System wakeup enabled by ACPI
[  252.900401] call 0000:00:1d.0+ returned 0 after 15495 usecs
[  252.900403] calling  0000:00:1c.3+ @ 2587, parent: pci0000:00
[  252.900475] call 0000:00:1c.3+ returned 0 after 68 usecs
[  252.900477] calling  0000:00:1c.2+ @ 2587, parent: pci0000:00
[  252.900547] call 0000:00:1c.2+ returned 0 after 67 usecs
[  252.900548] calling  0000:00:1c.1+ @ 2587, parent: pci0000:00
[  252.900618] call 0000:00:1c.1+ returned 0 after 67 usecs
[  252.900620] calling  0000:00:1c.0+ @ 2587, parent: pci0000:00
[  252.900691] call 0000:00:1c.0+ returned 0 after 68 usecs
[  252.900692] calling  0000:00:1b.0+ @ 2587, parent: pci0000:00
[  252.900694] call 0000:00:1b.0+ returned 0 after 0 usecs
[  252.900695] calling  0000:00:1a.0+ @ 2587, parent: pci0000:00
[  252.901149] ehci-pci 0000:00:1a.0: System wakeup enabled by ACPI
[  252.916417] call 0000:00:1a.0+ returned 0 after 15334 usecs
[  252.916419] calling  0000:00:16.0+ @ 2587, parent: pci0000:00
[  252.916469] call 0000:00:16.0+ returned 0 after 47 usecs
[  252.916470] calling  0000:00:14.0+ @ 2587, parent: pci0000:00

I have some questions:
1. "call 0000:00:1d.0+ returned 0 after 15495 usecs" mean all ports
under this ehci host total cost 15495 us for resuming?
2. is it possible to change the order of calling resume callback?
    for example, suppose the original sequence is "ehci -> xhci -> tty
..." and I want to change as "tty-> ehci -> xhci".
3. what is above "usb2+" mean? after trace source code, It seems "type" resume.
    I can tell "bus" resume, since it is bus driver layer resume call back API.
    What is "type" resume?

Appreciate your help,

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help