]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/pci/pci.c
[PATCH] PCI: Provide a boot parameter to disable MSI
[karo-tx-linux.git] / drivers / pci / pci.c
index d2d1879166436cfee7f82c6e0fa0493cfdc8c3b0..03af2323893971ec5b3bcd8ef761781aef014f57 100644 (file)
@@ -19,7 +19,6 @@
 #include <asm/dma.h>   /* isa_dma_bridge_buggy */
 #include "pci.h"
 
-#if 0
 
 /**
  * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children
@@ -34,7 +33,7 @@ pci_bus_max_busnr(struct pci_bus* bus)
        struct list_head *tmp;
        unsigned char max, n;
 
-       max = bus->number;
+       max = bus->subordinate;
        list_for_each(tmp, &bus->children) {
                n = pci_bus_max_busnr(pci_bus_b(tmp));
                if(n > max)
@@ -42,7 +41,9 @@ pci_bus_max_busnr(struct pci_bus* bus)
        }
        return max;
 }
+EXPORT_SYMBOL_GPL(pci_bus_max_busnr);
 
+#if 0
 /**
  * pci_max_busnr - returns maximum PCI bus number
  *
@@ -495,9 +496,8 @@ pci_enable_device_bars(struct pci_dev *dev, int bars)
 int
 pci_enable_device(struct pci_dev *dev)
 {
-       int err;
-
-       if ((err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1)))
+       int err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1);
+       if (err)
                return err;
        pci_fixup_device(pci_fixup_enable, dev);
        dev->is_enabled = 1;
@@ -900,8 +900,12 @@ static int __devinit pci_setup(char *str)
                if (k)
                        *k++ = 0;
                if (*str && (str = pcibios_setup(str)) && *str) {
-                       /* PCI layer options should be handled here */
-                       printk(KERN_ERR "PCI: Unknown option `%s'\n", str);
+                       if (!strcmp(str, "nomsi")) {
+                               pci_no_msi();
+                       } else {
+                               printk(KERN_ERR "PCI: Unknown option `%s'\n",
+                                               str);
+                       }
                }
                str = k;
        }