diff options
Diffstat (limited to 'arch/x86/pci/common.c')
-rw-r--r-- | arch/x86/pci/common.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 215a27ae050d..a0772af64efb 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -125,6 +125,23 @@ void __init dmi_check_skip_isa_align(void) | |||
125 | static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | 125 | static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) |
126 | { | 126 | { |
127 | struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; | 127 | struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; |
128 | struct resource *bar_r; | ||
129 | int bar; | ||
130 | |||
131 | if (pci_probe & PCI_NOASSIGN_BARS) { | ||
132 | /* | ||
133 | * If the BIOS did not assign the BAR, zero out the | ||
134 | * resource so the kernel doesn't attmept to assign | ||
135 | * it later on in pci_assign_unassigned_resources | ||
136 | */ | ||
137 | for (bar = 0; bar <= PCI_STD_RESOURCE_END; bar++) { | ||
138 | bar_r = &dev->resource[bar]; | ||
139 | if (bar_r->start == 0 && bar_r->end != 0) { | ||
140 | bar_r->flags = 0; | ||
141 | bar_r->end = 0; | ||
142 | } | ||
143 | } | ||
144 | } | ||
128 | 145 | ||
129 | if (pci_probe & PCI_NOASSIGN_ROMS) { | 146 | if (pci_probe & PCI_NOASSIGN_ROMS) { |
130 | if (rom_r->parent) | 147 | if (rom_r->parent) |
@@ -509,6 +526,9 @@ char * __devinit pcibios_setup(char *str) | |||
509 | } else if (!strcmp(str, "norom")) { | 526 | } else if (!strcmp(str, "norom")) { |
510 | pci_probe |= PCI_NOASSIGN_ROMS; | 527 | pci_probe |= PCI_NOASSIGN_ROMS; |
511 | return NULL; | 528 | return NULL; |
529 | } else if (!strcmp(str, "nobar")) { | ||
530 | pci_probe |= PCI_NOASSIGN_BARS; | ||
531 | return NULL; | ||
512 | } else if (!strcmp(str, "assign-busses")) { | 532 | } else if (!strcmp(str, "assign-busses")) { |
513 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; | 533 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; |
514 | return NULL; | 534 | return NULL; |