From 2fa2808dd74a49c48f3bb1318204ea9886f0d15f Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Mon, 31 Dec 2007 10:04:15 +1100 Subject: [PATCH] --- yaml --- r: 81218 b: refs/heads/master c: 533b1928b5c37dbdaabec3e7ff073aee8d7af3eb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/pci-common.c | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index e6d50851cf3b..b7b9dfd50b9a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d2d8cfc657e2fc766cd2c0487397109240cb0427 +refs/heads/master: 533b1928b5c37dbdaabec3e7ff073aee8d7af3eb diff --git a/trunk/arch/powerpc/kernel/pci-common.c b/trunk/arch/powerpc/kernel/pci-common.c index 571854f2906c..d394d41b61d5 100644 --- a/trunk/arch/powerpc/kernel/pci-common.c +++ b/trunk/arch/powerpc/kernel/pci-common.c @@ -1035,7 +1035,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) } } -static inline int __devinit alloc_resource(struct pci_dev *dev, int idx) +static inline void __devinit alloc_resource(struct pci_dev *dev, int idx) { struct resource *pr, *r = &dev->resource[idx]; @@ -1059,10 +1059,7 @@ static inline int __devinit alloc_resource(struct pci_dev *dev, int idx) r->flags |= IORESOURCE_UNSET; r->end -= r->start; r->start = 0; - - return -EBUSY; } - return 0; } static void __init pcibios_allocate_resources(int pass) @@ -1084,12 +1081,8 @@ static void __init pcibios_allocate_resources(int pass) disabled = !(command & PCI_COMMAND_IO); else disabled = !(command & PCI_COMMAND_MEMORY); - if (pass == disabled && alloc_resource(dev, idx)) { - command &= ~(r->flags & (IORESOURCE_IO | - IORESOURCE_MEM)); - pci_write_config_word(dev, - PCI_COMMAND, command); - } + if (pass == disabled) + alloc_resource(dev, idx); } if (pass) continue;