aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2008-05-15 15:51:31 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-06-10 13:59:46 -0400
commite1a2a51e684bfe9d6165992d4a065439617a3107 (patch)
tree4d05a1b9ebadd0ab22e0e42ee3b053dddf11baf1 /include/linux
parent273c11270d3715c4c06d4df1607a1a60034d887b (diff)
Suspend/Resume bug in PCI layer wrt quirks
Some quirks should be called with interrupt disabled, we can't directly call them in .resume_early. Also the patch introduces pci_fixup_resume_early and pci_fixup_suspend, which matches current device core callbacks (.suspend/.resume_early). TBD: Somebody knows why we need quirk resume should double check if a quirk should be called in resume or resume_early. I changed some per my understanding, but can't make sure I fixed all. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index aaa9f333fb44..700704ef70f3 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1013,7 +1013,9 @@ enum pci_fixup_pass {
1013 pci_fixup_header, /* After reading configuration header */ 1013 pci_fixup_header, /* After reading configuration header */
1014 pci_fixup_final, /* Final phase of device fixups */ 1014 pci_fixup_final, /* Final phase of device fixups */
1015 pci_fixup_enable, /* pci_enable_device() time */ 1015 pci_fixup_enable, /* pci_enable_device() time */
1016 pci_fixup_resume, /* pci_enable_device() time */ 1016 pci_fixup_resume, /* pci_device_resume() */
1017 pci_fixup_suspend, /* pci_device_suspend */
1018 pci_fixup_resume_early, /* pci_device_resume_early() */
1017}; 1019};
1018 1020
1019/* Anonymous variables would be nice... */ 1021/* Anonymous variables would be nice... */
@@ -1035,6 +1037,12 @@ enum pci_fixup_pass {
1035#define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook) \ 1037#define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook) \
1036 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ 1038 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \
1037 resume##vendor##device##hook, vendor, device, hook) 1039 resume##vendor##device##hook, vendor, device, hook)
1040#define DECLARE_PCI_FIXUP_RESUME_EARLY(vendor, device, hook) \
1041 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early, \
1042 resume_early##vendor##device##hook, vendor, device, hook)
1043#define DECLARE_PCI_FIXUP_SUSPEND(vendor, device, hook) \
1044 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \
1045 suspend##vendor##device##hook, vendor, device, hook)
1038 1046
1039 1047
1040void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); 1048void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);