linux/drivers/pci
Yinghai Lu 308cf8e13f PCI: get larger bridge ranges when space is available
Found one system:
[   71.120590] pci 0000:40:05.0: scanning behind bridge, config 4f4a40, pass 0
[   71.138283] PCI: Scanning bus 0000:4a
[   71.140341] pci 0000:4a:00.0: found [15b3:6278] class 000c06 header type 00
[   71.157173] pci 0000:4a:00.0: reg 10 64bit mmio: [0x000000-0x0fffff]
[   71.161697] pci 0000:4a:00.0: reg 18 64bit mmio pref: [0x000000-0x7fffff]
[   71.179403] pci 0000:4a:00.0: reg 20 64bit mmio pref: [0x000000-0xfffffff]
[   71.185366] pci 0000:4a:00.0: calling quirk_resource_alignment+0x0/0x1dd
[   71.200846] pci 0000:4a:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[   71.219623] PCI: Fixups for bus 0000:4a
[   71.222194] pci 0000:40:05.0: bridge 32bit mmio: [0xcf000000-0xcf0fffff]
[   71.238662] pci 0000:40:05.0: bridge 64bit mmio pref: [0xcd800000-0xcdffffff]
[   71.255793] PCI: Bus scan for 0000:4a returning with max=4a

Device needs a big pref mmio, but BIOS doesn't allocate mmio to it aside
from a small MMIO range.  Later, the kernel will not allocate resources to
that to the device:
[   99.574030] pci 0000:4a:00.0: BAR 4: can't allocate mem resource [0xd0000000-0xcdffffff]
[   99.580102] pci 0000:4a:00.0: BAR 2: got res [0xcd800000-0xcdffffff] bus [0xcd800000-0xcdffffff] flags 0x12120c
[   99.602307] pci 0000:4a:00.0: BAR 2: moved to bus [0xcd800000-0xcdffffff] flags 0x12120c
[   99.615991] pci 0000:4a:00.0: BAR 0: got res [0xcf000000-0xcf0fffff] bus [0xcf000000-0xcf0fffff] flags 0x120204
[   99.634499] pci 0000:4a:00.0: BAR 0: moved to bus [0xcf000000-0xcf0fffff] flags 0x120204
[   99.654318] pci 0000:40:05.0: PCI bridge, secondary bus 0000:4a
[   99.658766] pci 0000:40:05.0:   IO window: disabled
[   99.675478] pci 0000:40:05.0:   MEM window: 0xcf000000-0xcf0fffff
[   99.681663] pci 0000:40:05.0:   PREFETCH window: 0x000000cd800000-0x000000cdffffff

So try to get a big range in the pci bridge if there is no child using
that range.  With the patch we get:
[   99.104525] pci 0000:4a:00.0: BAR 4: got res [0xfc080000000-0xfc08fffffff] bus [0xfc080000000-0xfc08fffffff] flags 0x12120c
[   99.123624] pci 0000:4a:00.0: BAR 4: moved to bus [0xfc080000000-0xfc08fffffff] flags 0x12120c
[   99.131977] pci 0000:4a:00.0: BAR 2: got res [0xfc090000000-0xfc0907fffff] bus [0xfc090000000-0xfc0907fffff] flags 0x12120c
[   99.149788] pci 0000:4a:00.0: BAR 2: moved to bus [0xfc090000000-0xfc0907fffff] flags 0x12120c
[   99.169248] pci 0000:4a:00.0: BAR 0: got res [0xc0200000-0xc02fffff] bus [0xc0200000-0xc02fffff] flags 0x120204
[   99.189508] pci 0000:4a:00.0: BAR 0: moved to bus [0xc0200000-0xc02fffff] flags 0x120204
[   99.206402] pci 0000:40:05.0: PCI bridge, secondary bus 0000:4a
[   99.210637] pci 0000:40:05.0:   IO window: disabled
[   99.224856] pci 0000:40:05.0:   MEM window: 0xc0200000-0xc03fffff
[   99.230019] pci 0000:40:05.0:   PREFETCH window: 0x000fc080000000-0x000fc097ffffff

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-10-07 09:28:18 -07:00
..
hotplug ACPICA: fixup after acpi_get_object_info() change 2009-09-25 14:24:22 -04:00
pcie PCI: PCIe portdrv: remove "-driver" from driver name 2009-10-06 09:41:48 -07:00
.gitignore
access.c PCI: Add pci_bus_set_ops 2009-06-16 14:29:33 -07:00
bus.c PCI AER: support Multiple Error Received and no error source id 2009-06-16 14:30:13 -07:00
dmar.c Merge git://git.infradead.org/iommu-2.6 2009-09-23 10:06:10 -07:00
hotplug-pci.c
hotplug.c
htirq.c Merge branch 'x86/apic' into irq/numa 2009-05-12 12:17:36 +02:00
intel-iommu.c Merge git://git.infradead.org/iommu-2.6 2009-09-23 10:06:10 -07:00
intr_remapping.c Merge git://git.infradead.org/iommu-2.6 2009-09-23 10:06:10 -07:00
intr_remapping.h Intel-IOMMU, intr-remap: source-id checking 2009-06-23 22:09:17 +01:00
iov.c PCI SR-IOV: correct broken resource alignment calculations 2009-08-30 08:37:25 -07:00
iova.c intel-iommu: Remove superfluous iova_alloc_lock from IOVA code 2009-07-15 08:17:02 +01:00
irq.c PCI: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-07 11:12:23 -08:00
Kconfig PCI: initialize and release SR-IOV capability 2009-03-20 10:48:22 -07:00
legacy.c PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
Makefile PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
msi.c PCI MSI: Style cleanups 2009-09-09 13:29:35 -07:00
msi.h PCI MSI: shorten PCI_MSIX_ENTRY_* symbol names 2009-06-29 12:15:19 -07:00
pci-acpi.c PCI / ACPI PM: Propagate wake-up enable for devices w/o ACPI support 2009-09-09 14:19:24 -07:00
pci-driver.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-09-16 07:49:54 -07:00
pci-stub.c PCI: pci-stub: add pci_stub.ids parameter 2009-09-09 13:44:34 -07:00
pci-sysfs.c PCI: expose function reset capability in sysfs 2009-09-09 13:29:24 -07:00
pci.c PCI: pci.c: fix kernel-doc notation 2009-10-07 09:28:18 -07:00
pci.h PCI: Simplify hotplug mch quirk. 2009-09-09 14:06:49 -07:00
probe.c PCI: Clear saved_state after the state has been restored 2009-09-14 13:41:46 -07:00
proc.c PCI: define PCI resource names in an 'enum' 2009-01-07 11:13:01 -08:00
quirks.c PCI quirk: TI XIO200a erroneously reports support for fast b2b transfers 2009-10-07 09:28:17 -07:00
remove.c PCI: eliminate redundant pci_stop_dev() call from pci_destroy_dev() 2009-06-11 12:04:19 -07:00
rom.c PCI: fix rom.c kernel-doc warning 2009-02-13 12:01:56 -08:00
search.c PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
setup-bus.c PCI: get larger bridge ranges when space is available 2009-10-07 09:28:18 -07:00
setup-irq.c PCI: use dev_printk when possible 2008-06-25 16:05:13 -07:00
setup-res.c PCI: remove pci_assign_resource_fixed() 2009-10-06 09:42:04 -07:00
slot.c PCI: fix kernel-doc warnings 2009-06-29 12:13:56 -07:00
syscall.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00