summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-10-05 22:25:07 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2004-10-05 22:25:07 -0700
commit7bfaf2ed2f8a64bfb4e12cbcc912766196e0d826 (patch)
tree94f51d3372042b94fe2e5218e3d4c81fc92ce5d1 /include
parent3322aa43b71f3555d8ba74a9fb45c10e600f92fd (diff)
[PATCH] add-pci_fixup_enable-pass.patch
From: Bjorn Helgaas <bjorn.helgaas@hp.com> Nick Piggin's USB driver stopped working when I removed the unconditional PCI ACPI IRQ routing stuff. He has verified that the attached patch fixes it. I sort of hate to add another pass of PCI fixups, so I'm open to alternate solutions if anybody suggests one. Add a "pci_fixup_enable" pass of PCI fixups. These are run at the end of pci_enable_device() to fix up things like IRQs that are not set up until then. Some VIA boards require a fixup after the IRQ is set up. Found by Nick Piggin, initial patch by Bjorn Helgaas, reworked to fit into current -mm by Nick. Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/vmlinux.lds.h3
-rw-r--r--include/linux/pci.h7
2 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index bb340cb5cb03..da1b3ba89b3e 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -24,6 +24,9 @@
VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \
*(.pci_fixup_final) \
VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \
+ VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \
+ *(.pci_fixup_enable) \
+ VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \
} \
\
/* Kernel symbol table: Normal symbols */ \
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 48d939c7625c..169badd4917e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1001,6 +1001,7 @@ struct pci_fixup {
enum pci_fixup_pass {
pci_fixup_header, /* Called immediately after reading configuration header */
pci_fixup_final, /* Final phase of device fixups */
+ pci_fixup_enable, /* pci_enable_device() time */
};
/* Anonymous variables would be nice... */
@@ -1014,6 +1015,12 @@ enum pci_fixup_pass {
__attribute__((__section__(".pci_fixup_final"))) = { \
vendor, device, hook };
+#define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \
+ static struct pci_fixup __pci_fixup_##vendor##device##hook __attribute_used__ \
+ __attribute__((__section__(".pci_fixup_enable"))) = { \
+ vendor, device, hook };
+
+
void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
extern int pci_pci_problems;