vserver 1.9.3
[linux-2.6.git] / include / linux / pci.h
index 2ce5f95..3f76ca0 100644 (file)
@@ -536,7 +536,7 @@ struct pci_dev {
        unsigned int    is_enabled:1;   /* pci_enable_device has been called */
        unsigned int    is_busmaster:1; /* device is busmaster */
        
-       unsigned int    saved_config_space[16]; /* config space saved at suspend time */
+       u32             saved_config_space[16]; /* config space saved at suspend time */
 #ifdef CONFIG_PCI_NAMES
 #define PCI_NAME_SIZE  96
 #define PCI_NAME_HALF  __stringify(43) /* less than half to handle slop */
@@ -712,7 +712,7 @@ struct resource *pci_find_parent_resource(const struct pci_dev *dev, struct reso
 int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge);
 extern struct pci_dev *pci_dev_get(struct pci_dev *dev);
 extern void pci_dev_put(struct pci_dev *dev);
-
+extern void pci_remove_bus(struct pci_bus *b);
 extern void pci_remove_bus_device(struct pci_dev *dev);
 
 /* Generic PCI functions exported to card drivers */
@@ -1001,17 +1001,27 @@ static inline char *pci_name(struct pci_dev *pdev)
  */
 
 struct pci_fixup {
-       int pass;
        u16 vendor, device;                     /* You can use PCI_ANY_ID here of course */
        void (*hook)(struct pci_dev *dev);
 };
 
-extern struct pci_fixup pcibios_fixups[];
+enum pci_fixup_pass {
+       pci_fixup_header,       /* Called immediately after reading configuration header */
+       pci_fixup_final,        /* Final phase of device fixups */
+};
+
+/* Anonymous variables would be nice... */
+#define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook)                                 \
+       static struct pci_fixup __pci_fixup_##vendor##device##hook __attribute_used__   \
+       __attribute__((__section__(".pci_fixup_header"))) = {                           \
+               vendor, device, hook };
 
-#define PCI_FIXUP_HEADER       1               /* Called immediately after reading configuration header */
-#define PCI_FIXUP_FINAL                2               /* Final phase of device fixups */
+#define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook)                          \
+       static struct pci_fixup __pci_fixup_##vendor##device##hook __attribute_used__   \
+       __attribute__((__section__(".pci_fixup_final"))) = {                            \
+               vendor, device, hook };
 
-void pci_fixup_device(int pass, struct pci_dev *dev);
+void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
 
 extern int pci_pci_problems;
 #define PCIPCI_FAIL            1