]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Allow PCI BARs that start at 0
authorAndrew Morton <akpm@osdl.org>
Wed, 4 Feb 2004 02:31:19 +0000 (18:31 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 4 Feb 2004 02:31:19 +0000 (18:31 -0800)
From: Anton Blanchard <anton@samba.org>

We have IO BARs on ppc64 machines that begin at address 0. The current
pci probe code will ignore anything that starts at 0. Remove these checks.

drivers/pci/probe.c

index 7ff393b53a28188b14af9c788b7ad0235feaee38..5117322ee1ed6ce5ec298993270566fbc9519623 100644 (file)
@@ -214,7 +214,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                limit |= (io_limit_hi << 16);
        }
 
-       if (base && base <= limit) {
+       if (base <= limit) {
                res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO;
                res->start = base;
                res->end = limit + 0xfff;
@@ -225,7 +225,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
        pci_read_config_word(dev, PCI_MEMORY_LIMIT, &mem_limit_lo);
        base = (mem_base_lo & PCI_MEMORY_RANGE_MASK) << 16;
        limit = (mem_limit_lo & PCI_MEMORY_RANGE_MASK) << 16;
-       if (base && base <= limit) {
+       if (base <= limit) {
                res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
                res->start = base;
                res->end = limit + 0xfffff;
@@ -251,7 +251,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                }
 #endif
        }
-       if (base && base <= limit) {
+       if (base <= limit) {
                res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
                res->start = base;
                res->end = limit + 0xfffff;