diff options
Diffstat (limited to 'arch/i386/pci/mmconfig-shared.c')
-rw-r--r-- | arch/i386/pci/mmconfig-shared.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/arch/i386/pci/mmconfig-shared.c b/arch/i386/pci/mmconfig-shared.c index 4757554b08cf..77de6de94f1f 100644 --- a/arch/i386/pci/mmconfig-shared.c +++ b/arch/i386/pci/mmconfig-shared.c | |||
@@ -197,6 +197,26 @@ static __init void pci_mmcfg_insert_resources(void) | |||
197 | } | 197 | } |
198 | } | 198 | } |
199 | 199 | ||
200 | static void __init pci_mmcfg_reject_broken(void) | ||
201 | { | ||
202 | typeof(pci_mmcfg_config[0]) *cfg = &pci_mmcfg_config[0]; | ||
203 | |||
204 | /* | ||
205 | * Handle more broken MCFG tables on Asus etc. | ||
206 | * They only contain a single entry for bus 0-0. | ||
207 | */ | ||
208 | if (pci_mmcfg_config_num == 1 && | ||
209 | cfg->pci_segment == 0 && | ||
210 | (cfg->start_bus_number | cfg->end_bus_number) == 0) { | ||
211 | kfree(pci_mmcfg_config); | ||
212 | pci_mmcfg_config = NULL; | ||
213 | pci_mmcfg_config_num = 0; | ||
214 | |||
215 | printk(KERN_ERR "PCI: start and end of bus number is 0. " | ||
216 | "Rejected as broken MCFG."); | ||
217 | } | ||
218 | } | ||
219 | |||
200 | void __init pci_mmcfg_init(int type) | 220 | void __init pci_mmcfg_init(int type) |
201 | { | 221 | { |
202 | int known_bridge = 0; | 222 | int known_bridge = 0; |
@@ -207,8 +227,10 @@ void __init pci_mmcfg_init(int type) | |||
207 | if (type == 1 && pci_mmcfg_check_hostbridge()) | 227 | if (type == 1 && pci_mmcfg_check_hostbridge()) |
208 | known_bridge = 1; | 228 | known_bridge = 1; |
209 | 229 | ||
210 | if (!known_bridge) | 230 | if (!known_bridge) { |
211 | acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg); | 231 | acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg); |
232 | pci_mmcfg_reject_broken(); | ||
233 | } | ||
212 | 234 | ||
213 | if ((pci_mmcfg_config_num == 0) || | 235 | if ((pci_mmcfg_config_num == 0) || |
214 | (pci_mmcfg_config == NULL) || | 236 | (pci_mmcfg_config == NULL) || |