diff options
author | Paul Mackerras <paulus@samba.org> | 2007-12-30 18:04:15 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-30 18:12:45 -0500 |
commit | 533b1928b5c37dbdaabec3e7ff073aee8d7af3eb (patch) | |
tree | 6080938ef7ad8c463b092a9c2711748ebe7eb10b /arch/powerpc/kernel | |
parent | d2d8cfc657e2fc766cd2c0487397109240cb0427 (diff) |
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 <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | 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 571854f2906c..d394d41b61d5 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -1035,7 +1035,7 @@ clear_resource: | |||
1035 | } | 1035 | } |
1036 | } | 1036 | } |
1037 | 1037 | ||
1038 | static inline int __devinit alloc_resource(struct pci_dev *dev, int idx) | 1038 | static inline void __devinit alloc_resource(struct pci_dev *dev, int idx) |
1039 | { | 1039 | { |
1040 | struct resource *pr, *r = &dev->resource[idx]; | 1040 | struct resource *pr, *r = &dev->resource[idx]; |
1041 | 1041 | ||
@@ -1059,10 +1059,7 @@ static inline int __devinit alloc_resource(struct pci_dev *dev, int idx) | |||
1059 | r->flags |= IORESOURCE_UNSET; | 1059 | r->flags |= IORESOURCE_UNSET; |
1060 | r->end -= r->start; | 1060 | r->end -= r->start; |
1061 | r->start = 0; | 1061 | r->start = 0; |
1062 | |||
1063 | return -EBUSY; | ||
1064 | } | 1062 | } |
1065 | return 0; | ||
1066 | } | 1063 | } |
1067 | 1064 | ||
1068 | static void __init pcibios_allocate_resources(int pass) | 1065 | static void __init pcibios_allocate_resources(int pass) |
@@ -1084,12 +1081,8 @@ static void __init pcibios_allocate_resources(int pass) | |||
1084 | disabled = !(command & PCI_COMMAND_IO); | 1081 | disabled = !(command & PCI_COMMAND_IO); |
1085 | else | 1082 | else |
1086 | disabled = !(command & PCI_COMMAND_MEMORY); | 1083 | disabled = !(command & PCI_COMMAND_MEMORY); |
1087 | if (pass == disabled && alloc_resource(dev, idx)) { | 1084 | if (pass == disabled) |
1088 | command &= ~(r->flags & (IORESOURCE_IO | | 1085 | alloc_resource(dev, idx); |
1089 | IORESOURCE_MEM)); | ||
1090 | pci_write_config_word(dev, | ||
1091 | PCI_COMMAND, command); | ||
1092 | } | ||
1093 | } | 1086 | } |
1094 | if (pass) | 1087 | if (pass) |
1095 | continue; | 1088 | continue; |