From df9b5954c67bf77d791577d422175ce333df62f0 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 3 Feb 2004 18:31:19 -0800 Subject: [PATCH] [PATCH] Allow PCI BARs that start at 0 From: Anton Blanchard 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 7ff393b53a281..5117322ee1ed6 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -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; -- 2.53.0