Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9d5f49283b85d925f17fa07af5e4879465e179d6
Commit:     9d5f49283b85d925f17fa07af5e4879465e179d6
Parent:     335675a3a2e6f3dc8f47111f73362aae8acc36bc
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 21 11:32:50 2008 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 22:52:53 2008 +1100

    [POWERPC] Always hookup PHB IO resource even when empty
    
    We must always hookup the pci_bus resource 0 to the PHB io_resource
    even if the latter is empty (the bus has no IO support).  Otherwise,
    some other code will end up hooking it up to something bogus and the
    resource tree will end up being broken.
    
    This fixes boot on QS20 Cell blades where the IDE driver failed to
    allocate the IO resources due to breakage of the resource tree.
    
    Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/pci_64.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 1930f39..5275074 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -357,7 +357,6 @@ void __devinit scan_phb(struct pci_controller *hose)
        struct pci_bus *bus;
        struct device_node *node = hose->dn;
        int i, mode;
-       struct resource *res;
 
        DBG("PCI: Scanning PHB %s\n", node ? node->full_name : "<NO NAME>");
 
@@ -375,12 +374,10 @@ void __devinit scan_phb(struct pci_controller *hose)
        pcibios_map_io_space(bus);
 
        /* Wire up PHB bus resources */
-       if (hose->io_resource.flags) {
-               DBG("PCI: PHB IO resource    = %016lx-%016lx [%lx]\n",
-                   hose->io_resource.start, hose->io_resource.end,
-                   hose->io_resource.flags);
-               bus->resource[0] = res = &hose->io_resource;
-       }
+       DBG("PCI: PHB IO resource    = %016lx-%016lx [%lx]\n",
+           hose->io_resource.start, hose->io_resource.end,
+           hose->io_resource.flags);
+       bus->resource[0] = &hose->io_resource;
        for (i = 0; i < 3; ++i) {
                DBG("PCI: PHB MEM resource %d = %016lx-%016lx [%lx]\n", i,
                    hose->mem_resources[i].start,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to