Runtime PM for PCI-based USB host controllers

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

 



Rafael:

I've been updating the patch Matthew Garrett posted last November, 
adding runtime PM methods for PCI USB controllers.  Overall the 
situation is now easier, since the rest of the USB subsystem has been 
converted over to the runtime PM framework.  And it even seems to work!

But there is one problem.  The device driver needs to know, during its
pm_suspend callback, whether or not wakeup should be enabled.  (Or more
accurately, the pm_suspend callback needs to fail if wakeup isn't going
to be available.)  However the wakeup decision isn't made in the PM
core until pci_pm_runtime_suspend() calls pci_finish_runtime_suspend(),
which doesn't occur until later.

Should the code be rearranged?  The parts about selecting the target 
state and pci_dev_run_wake() could be moved up into 
pci_pm_runtime_suspend().  But there still remains the question of how 
to let the driver know what the wakeup setting will be.  Any ideas?

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?

Alan Stern

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux