diff options
author | Andreas Noever <andreas.noever@gmail.com> | 2014-06-03 16:04:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-19 17:08:41 -0400 |
commit | 7d2a01b87f1682fde87461864e6682031bfaa0a9 (patch) | |
tree | 071da51f78bd9b2091ea9663be6d0dde4069492e /include/linux/pci.h | |
parent | 3364f0c12795713e89ae1209081c60d64bfb4ca1 (diff) |
PCI: Add pci_fixup_suspend_late quirk pass
Add pci_fixup_suspend_late as a new pci_fixup_pass. The pass is called
from suspend_noirq and poweroff_noirq. Using the same pass for suspend
and hibernate is consistent with resume_early which is called by
resume_noirq and restore_noirq.
The new quirk pass is required for Thunderbolt support on Apple
hardware.
Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 466bcd111d85..295d3a9d8ffe 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1477,8 +1477,9 @@ enum pci_fixup_pass { | |||
1477 | pci_fixup_final, /* Final phase of device fixups */ | 1477 | pci_fixup_final, /* Final phase of device fixups */ |
1478 | pci_fixup_enable, /* pci_enable_device() time */ | 1478 | pci_fixup_enable, /* pci_enable_device() time */ |
1479 | pci_fixup_resume, /* pci_device_resume() */ | 1479 | pci_fixup_resume, /* pci_device_resume() */ |
1480 | pci_fixup_suspend, /* pci_device_suspend */ | 1480 | pci_fixup_suspend, /* pci_device_suspend() */ |
1481 | pci_fixup_resume_early, /* pci_device_resume_early() */ | 1481 | pci_fixup_resume_early, /* pci_device_resume_early() */ |
1482 | pci_fixup_suspend_late, /* pci_device_suspend_late() */ | ||
1482 | }; | 1483 | }; |
1483 | 1484 | ||
1484 | /* Anonymous variables would be nice... */ | 1485 | /* Anonymous variables would be nice... */ |
@@ -1519,6 +1520,11 @@ enum pci_fixup_pass { | |||
1519 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ | 1520 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ |
1520 | suspend##hook, vendor, device, class, \ | 1521 | suspend##hook, vendor, device, class, \ |
1521 | class_shift, hook) | 1522 | class_shift, hook) |
1523 | #define DECLARE_PCI_FIXUP_CLASS_SUSPEND_LATE(vendor, device, class, \ | ||
1524 | class_shift, hook) \ | ||
1525 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend_late, \ | ||
1526 | suspend_late##hook, vendor, device, \ | ||
1527 | class, class_shift, hook) | ||
1522 | 1528 | ||
1523 | #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \ | 1529 | #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \ |
1524 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ | 1530 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ |
@@ -1544,6 +1550,10 @@ enum pci_fixup_pass { | |||
1544 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ | 1550 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ |
1545 | suspend##hook, vendor, device, \ | 1551 | suspend##hook, vendor, device, \ |
1546 | PCI_ANY_ID, 0, hook) | 1552 | PCI_ANY_ID, 0, hook) |
1553 | #define DECLARE_PCI_FIXUP_SUSPEND_LATE(vendor, device, hook) \ | ||
1554 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend_late, \ | ||
1555 | suspend_late##hook, vendor, device, \ | ||
1556 | PCI_ANY_ID, 0, hook) | ||
1547 | 1557 | ||
1548 | #ifdef CONFIG_PCI_QUIRKS | 1558 | #ifdef CONFIG_PCI_QUIRKS |
1549 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); | 1559 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); |