Messages in this thread Patch in this message | | | Date | Sun, 27 Jul 2003 01:00:59 +0200 | From | Pavel Machek <> | Subject | [PM] more callbacks for pci powermanagment |
| |
Hi!
Some PCI devices need to act during power-on... Greg refused to apply it waiting for you, but you probably remember that discussion.
Pavel
Index: linux/drivers/pci/pci-driver.c =================================================================== --- linux.orig/drivers/pci/pci-driver.c 2003-07-22 13:39:43.000000000 +0200 +++ linux/drivers/pci/pci-driver.c 2003-07-22 13:26:26.000000000 +0200 @@ -179,11 +179,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; Index: linux/include/linux/pci.h =================================================================== --- linux.orig/include/linux/pci.h 2003-07-22 13:39:42.000000000 +0200 +++ linux/include/linux/pci.h 2003-07-22 13:26:52.000000000 +0200 @@ -512,6 +512,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 */
-- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |