diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-11-04 00:39:30 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-01-07 17:58:48 -0500 |
commit | b3e65e1f9185a2eb034defe4270ba178ba70b9a9 (patch) | |
tree | 3ddb43c3333138c9dd3692276ef8d541b6000213 /arch/x86/pci/i386.c | |
parent | 3c449ed0075994b3f3371f8254560428ba787efc (diff) |
x86/PCI: Implement pcibios_resource_survey_bus()
During testing remove/rescan root bus 00, found
[ 338.142574] bus: 'pci': really_probe: probing driver ata_piix with device 0000:00:01.1
[ 338.146788] ata_piix 0000:00:01.1: device not available (can't reserve [io 0x01f0-0x01f7])
[ 338.150565] ata_piix: probe of 0000:00:01.1 failed with error -22
because that fixed resource is not claimed.
For bootint path it is claimed in from
arch/x86/pci/i386.c::pcibios_allocate_resources()
Claim those resources, so on the remove/rescan will still use old
resources.
It is some kind honoring FW setting in the registers during hot add.
esp root-bus hot add is through acpi, BIOS has chance to set some registers
before handing over.
[bhelgaas: move weak definition to patch that uses it]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'arch/x86/pci/i386.c')
-rw-r--r-- | arch/x86/pci/i386.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 8656ea88cf66..94919e307f8e 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -352,6 +352,19 @@ static int __init pcibios_assign_resources(void) | |||
352 | return 0; | 352 | return 0; |
353 | } | 353 | } |
354 | 354 | ||
355 | void pcibios_resource_survey_bus(struct pci_bus *bus) | ||
356 | { | ||
357 | dev_printk(KERN_DEBUG, &bus->dev, "Allocating resources\n"); | ||
358 | |||
359 | pcibios_allocate_bus_resources(bus); | ||
360 | |||
361 | pcibios_allocate_resources(bus, 0); | ||
362 | pcibios_allocate_resources(bus, 1); | ||
363 | |||
364 | if (!(pci_probe & PCI_ASSIGN_ROMS)) | ||
365 | pcibios_allocate_rom_resources(bus); | ||
366 | } | ||
367 | |||
355 | void __init pcibios_resource_survey(void) | 368 | void __init pcibios_resource_survey(void) |
356 | { | 369 | { |
357 | struct pci_bus *bus; | 370 | struct pci_bus *bus; |