On Thu, 26 Jun 2008, Rafael J. Wysocki wrote: > > Question: Does the PME Status ever get cleared at any other times? > > Currently, PME# status is only cleared when executing pci_pme_active() (for > example via pci_enable_wake()). > > > For instance, suppose a PCI device does use PME# to wake up the system. > > Does its status get cleared? > > If the driver of the device executes pci_enable_wake(dev, PCI_D0, false) during > resume, then the PME# status will be cleared. Hmm. So if the resume routine doesn't get called for some reason then most likely the status won't get cleared. > Do you think the core should clear PME# status automatically in that case? Yes. > > Or suppose a PCI device is runtime-suspended and it generates a wakeup > > request? This will turn on PME# at a time when the system isn't asleep > > -- what happens then? Does it get lost somewhere in the bowels of > > ACPI? > > Currently, yes, AFAICS. Back around last November some initial patches were posted by Shaohua Li, as part of Bugzilla #6892. You'd probably be interested to read through the entire bug report. Maybe we should start working on it again. > > Does the PCI core need new code to handle such things? > > Well, I thought of adding such things like the clearing of PME# status to the > PCI bus type suspend/resume callbacks. > > Apart from this, I think that to implement PCI runtime PM we'll need to add > some new code. First of all, we need to handle the case when some devices are > in low power states before suspend/hibernation. Second, we need to handle PME# > generated by devices being in low power states (or even in D0) at run time and > that will certainly require new code. Yes it will. We don't have any runtime PM infrastructure for PCI yet. Although to tell the truth, I'm not sure how important it is. How much power can we save by doing runtime suspends of PCI devices? With USB controllers, for example, much or most of the savings comes from disabling the USB portions of the device, which we _are_ doing. It's not clear how much more would be gained by shutting down the PCI portions as well. Alan Stern _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm