On Wed, 28 Sep 2011, Rafael J. Wysocki wrote: > On Wednesday, September 28, 2011, Alan Stern wrote: > > On Wed, 28 Sep 2011, Rafael J. Wysocki wrote: > > > > > > > That's possible. Moreover, it is possible that the BIOS removes power > > > > > from the bus segment the device is on entirely, in which case it would > > > > > need the auxiliary power source to generate wakeup events. > > > > > > > > Is there any way to find out whether this is happening? > > > > > > Frankly, I don't know. > > > > > > We may be entering an area that's never been tested by any vendors > > > in this case. > > > > Probably not. Still, I thought perhaps a little special-purpose > > debugging code at the right spot in the appropriate PCI early-resume > > routine might be able to read the PME# status before the device gets > > reset or its config space gets overwritten. (Although if the BIOS > > messes around with the controller, it might destroy what I'm looking > > for. Maybe disabling USB support in the BIOS will help...) > > > > What's the earliest spot in the resume path where I can read the > > PME# status? > > In pci_restore_standard_config(), before pci_restore_state() is called. Okay, it looks like your guess was correct. I disabled USB support in the BIOS, which caused the on-board USB controllers to vanish but left the controllers on the PCI card present. I suspended the system with a USB keyboard plugged in, typed on the keys (which should have generated a wakeup event) and then resumed the system. The PME# status in pci_restore_standard_config() was 0. Not only that -- I wired an LED into the USB bus power line. The LED turned off while the system was suspended, indicating that the controller wasn't powering the USB bus. Without bus power, there's no way to detect wakeup events. Oh well, evidently I won't be able to test remote wakeup on that controller. 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