Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=533b1928b5c37dbdaabec3e7ff073aee8d7af3eb Commit: 533b1928b5c37dbdaabec3e7ff073aee8d7af3eb Parent: d2d8cfc657e2fc766cd2c0487397109240cb0427 Author: Paul Mackerras <[EMAIL PROTECTED]> AuthorDate: Mon Dec 31 10:04:15 2007 +1100 Committer: Paul Mackerras <[EMAIL PROTECTED]> CommitDate: Mon Dec 31 10:12:45 2007 +1100
Revert "[POWERPC] Disable PCI IO/Mem on a device when resources can't be allocated" This reverts commit 553aa7659bc0e188348f64e978343ed984eb6e56 at Ben H's request, because it confused IORESOURCE_* flags with command register bits. Requested-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> --- arch/powerpc/kernel/pci-common.c | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 571854f..d394d41 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -1035,7 +1035,7 @@ clear_resource: } } -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; - 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