aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-12-04 18:14:45 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-20 13:54:43 -0500
commit1597cacbe39802d86656d1f2e6329895bd2ef531 (patch)
tree23036b221b31f154118582af7dbc5cd35fc97bc8 /include/linux/pci.h
parentbeb7cc8238a8334d86c96bf32bf66182db3b619f (diff)
PCI: Fix multiple problems with VIA hardware
This patch is designed to fix: - Disk eating corruptor on KT7 after resume from RAM - VIA IRQ handling - VIA fixups for bus lockups after resume from RAM The core of this is to add a table of resume fixups run at resume time. We need to do this for a variety of boards and features, but particularly we need to do this to get various critical VIA fixups done on resume. The second part of the problem is to handle VIA IRQ number rules which are a bit odd and need special handling for PIC interrupts. Various patches broke various boxes and while this one may not be perfect (hopefully it is) it ensures the workaround is applied to the right devices only. From: Jean Delvare <khali@linux-fr.org> Now that PCI quirks are replayed on software resume, we can safely re-enable the Asus SMBus unhiding quirk even when software suspend support is enabled. [akpm@osdl.org: fix const warning] Signed-off-by: Alan Cox <alan@redhat.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index b20ffb65300f..c1a2bc8e09de 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -396,6 +396,21 @@ struct pci_driver {
396 */ 396 */
397#define pci_module_init pci_register_driver 397#define pci_module_init pci_register_driver
398 398
399/**
400 * PCI_VDEVICE - macro used to describe a specific pci device in short form
401 * @vend: the vendor name
402 * @dev: the 16 bit PCI Device ID
403 *
404 * This macro is used to create a struct pci_device_id that matches a
405 * specific PCI device. The subvendor, and subdevice fields will be set
406 * to PCI_ANY_ID. The macro allows the next field to follow as the device
407 * private data.
408 */
409
410#define PCI_VDEVICE(vendor, device) \
411 PCI_VENDOR_ID_##vendor, (device), \
412 PCI_ANY_ID, PCI_ANY_ID, 0, 0
413
399/* these external functions are only available when PCI support is enabled */ 414/* these external functions are only available when PCI support is enabled */
400#ifdef CONFIG_PCI 415#ifdef CONFIG_PCI
401 416
@@ -787,6 +802,7 @@ enum pci_fixup_pass {
787 pci_fixup_header, /* After reading configuration header */ 802 pci_fixup_header, /* After reading configuration header */
788 pci_fixup_final, /* Final phase of device fixups */ 803 pci_fixup_final, /* Final phase of device fixups */
789 pci_fixup_enable, /* pci_enable_device() time */ 804 pci_fixup_enable, /* pci_enable_device() time */
805 pci_fixup_resume, /* pci_enable_device() time */
790}; 806};
791 807
792/* Anonymous variables would be nice... */ 808/* Anonymous variables would be nice... */
@@ -805,6 +821,9 @@ enum pci_fixup_pass {
805#define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ 821#define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \
806 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ 822 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \
807 vendor##device##hook, vendor, device, hook) 823 vendor##device##hook, vendor, device, hook)
824#define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook) \
825 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \
826 resume##vendor##device##hook, vendor, device, hook)
808 827
809 828
810void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); 829void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);