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

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


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux