Skip to contentSkip to conversation

Runtime PM for PCI-based USB host controllers

DISCUSSION Alan Stern 2 participants 2 messages May 26, 2010 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Alan Stern

author
#1 lore raw
Quoted 4 lines · Matthew Garrett

On Wed, May 26, 2010 at 11:51:12AM -0400, Alan Stern wrote:

(leaving the wakeup stuff to Rafael for the moment...)

Quoted 8 lines
Quoted 5 lines

Another question... The PCI core doesn't call pm_runtime_enable() or pci_runtime_set_active() anywhere. Apparently this is left up to the individual device driver. But shouldn't the core take this responsibility? What happens to PCI devices for which there is no driver? Shouldn't the core put them into runtime suspend by default?

This is problematic in the GPU case, at least, since there are still many that get driven by userspace rather than by the kernel.

I don't know how that works. However an easy approach would be to make opening the device file (or however the userspace driver gets a reference to the device) cause the core to do a pm_runtime_get_sync(), with a corresponding pm_runtime_put_sync() when the file is closed.

Alan Stern

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 4 lines · Alan Stern

I don't know how that works. However an easy approach would be to make opening the device file (or however the userspace driver gets a reference to the device) cause the core to do a pm_runtime_get_sync(), with a corresponding pm_runtime_put_sync() when the file is closed.

No, X is far worse than you think. It's handled by mmap()ping /dev/mem.

Signature · 1 line
Matthew Garrett | [email protected]