Patch: PCI device RESUME_POWER_ON handler
The appended patch allows pci-devices to register a handler for RESUME_POWER_ON, to be called during S2/S3 resume *before* interrupts are enabled. This is necessary eg to revive the Radeon M6 graphics adapter on the Fujitsu P2120. (This is not all there is to getting the P2120 video to work after resume...)
Now, how can I do the corresponding thing with the keyboard and mouse? I don't see any pm related hooks in serio...
Ole
drivers/pci/pci-driver.c +3 -5
@@ -91,11 +91,9 @@struct pci_dev * pci_dev =to_pci_dev (dev);if (pci_dev->driver) { -/* We may not call PCI drivers resume at -RESUME_POWER_ON because interrupts are not yet -working at that point. Calling resume at -RESUME_RESTORE_STATE seems like solution. */ -if (level ==RESUME_RESTORE_STATE && pci_dev->driver->resume) +if (level ==RESUME_POWER_ON && pci_dev->driver->power_on) + pci_dev->driver->power_on (pci_dev); +else if (level ==RESUME_RESTORE_STATE && pci_dev->driver->resume) pci_dev->driver->resume (pci_dev); }return 0 ;
include/linux/pci.h +1 -0
@@ -499,6 +499,7 @@void (*remove) (struct pci_dev *dev);/* Device removed (NULL if not a hot-plug capable driver) */ int (*save_state) (struct pci_dev *dev,u32 state);/* Save Device Context */ int (*suspend) (struct pci_dev *dev,u32 state);/* Device suspended */ +int (*power_on) (struct pci_dev *dev);/* Device power on */ int (*resume) (struct pci_dev *dev);/* Device woken up */ int (*enable_wake) (struct pci_dev *dev,u32 state,int enable);/* Enable wake event */
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en