Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / i386 / pci / numa.c
index ddf9ac7..adbe17a 100644 (file)
 #define PCI_CONF1_MQ_ADDRESS(bus, devfn, reg) \
        (0x80000000 | (BUS2LOCAL(bus) << 16) | (devfn << 8) | (reg & ~3))
 
-static int pci_conf1_mq_read (int seg, int bus, int devfn, int reg, int len, u32 *value)
+static int pci_conf1_mq_read(unsigned int seg, unsigned int bus,
+                            unsigned int devfn, int reg, int len, u32 *value)
 {
        unsigned long flags;
 
-       if (!value || (bus > MAX_MP_BUSSES) || (devfn > 255) || (reg > 255))
+       if (!value || (bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255))
                return -EINVAL;
 
        spin_lock_irqsave(&pci_config_lock, flags);
@@ -42,11 +43,12 @@ static int pci_conf1_mq_read (int seg, int bus, int devfn, int reg, int len, u32
        return 0;
 }
 
-static int pci_conf1_mq_write (int seg, int bus, int devfn, int reg, int len, u32 value)
+static int pci_conf1_mq_write(unsigned int seg, unsigned int bus,
+                             unsigned int devfn, int reg, int len, u32 value)
 {
        unsigned long flags;
 
-       if ((bus > MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) 
+       if ((bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) 
                return -EINVAL;
 
        spin_lock_irqsave(&pci_config_lock, flags);
@@ -113,6 +115,8 @@ static int __init pci_numa_init(void)
                return 0;
 
        pci_root_bus = pcibios_scan_root(0);
+       if (pci_root_bus)
+               pci_bus_add_devices(pci_root_bus);
        if (num_online_nodes() > 1)
                for_each_online_node(quad) {
                        if (quad == 0)