linux/drivers
Bjorn Helgaas 58c84eda07 PCI: fall back to original BIOS BAR addresses
If we fail to assign resources to a PCI BAR, this patch makes us try the
original address from BIOS rather than leaving it disabled.

Linux tries to make sure all PCI device BARs are inside the upstream
PCI host bridge or P2P bridge apertures, reassigning BARs if necessary.
Windows does similar reassignment.

Before this patch, if we could not move a BAR into an aperture, we left
the resource unassigned, i.e., at address zero.  Windows leaves such BARs
at the original BIOS addresses, and this patch makes Linux do the same.

This is a bit ugly because we disable the resource long before we try to
reassign it, so we have to keep track of the BIOS BAR address somewhere.
For lack of a better place, I put it in the struct pci_dev.

I think it would be cleaner to attempt the assignment immediately when the
claim fails, so we could easily remember the original address.  But we
currently claim motherboard resources in the middle, after attempting to
claim PCI resources and before assigning new PCI resources, and changing
that is a fairly big job.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16263

Reported-by: Andrew <nitr0@seti.kr.ua>
Tested-by: Andrew <nitr0@seti.kr.ua>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-07-16 11:39:48 -07:00
..
accessibility
acpi correct console log level when ERST ACPI table is not found 2010-07-01 18:40:29 -07:00
amba
ata ata_generic: implement ATA_GEN_* flags and force enable DMA on MBP 7,1 2010-07-01 15:34:48 -04:00
atm Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
auxdisplay auxdisplay: section cleanup in cfag12864bfb driver 2010-05-25 08:07:09 -07:00
base topology: convert cpu notifier to return encapsulate errno value 2010-05-27 09:12:48 -07:00
block cciss: set SCSI max cmd len to 16, as default is wrong 2010-06-15 08:12:34 +02:00
bluetooth drivers: bluetooth: bluecard_cs.c: Fixed include error, changed to linux/io.h 2010-07-01 21:28:14 -07:00
cdrom of: Always use 'struct device.of_node' to get device node pointer. 2010-05-18 16:10:44 -06:00
char Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-07-01 09:36:49 -07:00
clocksource clocksource: sh_cmt: Fix up bogus shift value. 2010-06-22 16:41:31 +09:00
connector
cpufreq Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:49:13 -07:00
cpuidle sched: Cure nr_iowait_cpu() users 2010-07-01 09:39:48 +02:00
crypto crypto: crypto4xx - Fix build breakage 2010-06-03 16:57:24 +10:00
dca
dio
dma of/dma: fix build breakage in ppc4xx adma driver 2010-07-02 15:46:17 -06:00
edac Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/i7core 2010-07-04 20:12:06 -07:00
eisa
firewire firewire: core: check for 1394a compliant IRM, fix inaccessibility of Sony camcorder 2010-06-02 19:48:13 +02:00
firmware sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
gpio drivers/gpio is platform-neutral 2010-06-29 15:29:32 -07:00
gpu drm: correctly update connector DPMS status in drm_fb_helper 2010-07-07 14:21:39 +10:00
hid HID: Send Report ID when numbered reports are sent over the control endpoint. 2010-07-11 23:13:15 +02:00
hwmon hwmon: (coretemp) Properly label the sensors 2010-07-09 16:22:51 +02:00
i2c Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2010-07-11 13:35:34 -07:00
ide powerpc/macio: Fix probing of macio devices by using the right of match table 2010-06-02 17:50:38 +10:00
idle intel_idle: native hardware cpuidle driver for latest Intel processors 2010-05-28 14:26:20 -04:00
ieee1394 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2010-05-27 10:22:06 -07:00
ieee802154
infiniband IB/qib: Use request_firmware() to load SD7220 firmware 2010-07-08 13:27:05 -07:00
input input: i8042 - add runtime check in x86's i8042_platform_init 2010-07-07 17:05:07 -07:00
isdn ISDN: hysdn, fix potential NULL dereference 2010-06-26 22:12:02 -07:00
leds i2c: Remove all i2c_set_clientdata(client, NULL) in drivers 2010-06-03 11:33:58 +02:00
lguest
macintosh Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2010-06-03 15:46:37 -07:00
mca
md md/raid5: don't include 'spare' drives when reshaping to fewer devices. 2010-06-24 13:36:04 +10:00
media V4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference 2010-07-08 16:50:24 -03:00
memstick
message drivers/message/i2o/i2o_config.c: use memdup_user 2010-05-27 09:12:41 -07:00
mfd i2c: Remove all i2c_set_clientdata(client, NULL) in drivers 2010-06-03 11:33:58 +02:00
misc vmware balloon: clamp number of collected non-balloonable pages 2010-06-04 15:21:44 -07:00
mmc mmc: msm: fix compile error on MSM7x30 2010-06-09 08:51:31 -07:00
mtd Merge git://git.infradead.org/~dwmw2/mtd-2.6.35 2010-06-07 17:10:06 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2010-07-07 19:56:00 -07:00
nubus
of Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
oprofile
parisc
parport m68k: amiga - Parallel port platform device conversion 2010-05-26 19:51:09 +02:00
pci PCI: fall back to original BIOS BAR addresses 2010-07-16 11:39:48 -07:00
pcmcia pcmcia: do not initialize the present flag too late. 2010-07-05 12:37:48 +02:00
platform intel_scu_ipc: Length fix 2010-06-01 08:40:47 -07:00
pnp
power [ARM] pxa/z2: fix missing include in battery driver 2010-06-13 23:55:13 +08:00
pps
ps3
rapidio rapidio: fix new kernel-doc warnings 2010-05-30 09:02:47 -07:00
regulator i2c: Remove all i2c_set_clientdata(client, NULL) in drivers 2010-06-03 11:33:58 +02:00
rtc rtc: fix ds1388 time corruption 2010-06-29 15:29:31 -07:00
s390 [S390] appldata/extmem/kvm: add missing GFP_KERNEL flag 2010-06-08 18:58:23 +02:00
sbus Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
scsi Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev 2010-06-03 15:48:15 -07:00
serial serial: cpm_uart: implement the cpm_uart_early_write() function for console poll 2010-06-30 08:15:17 -07:00
sfi SFI: do not return freed pointer 2010-06-01 12:04:35 -04:00
sh sh: Make intc messages consistent via pr_fmt. 2010-06-02 18:10:00 +09:00
sn
spi powerpc/cpm: Reintroduce global spi_pram struct (fixes build issue) 2010-07-11 11:03:22 -05:00
ssb ssb: fix NULL ptr deref when pcihost_wrapper is used 2010-05-28 13:57:01 -04:00
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2010-06-30 15:45:59 -07:00
tc
telephony drivers/telephony/ixj.c: use memdup_user 2010-05-27 09:12:42 -07:00
thermal
uio
usb V4L/DVB: uvc: Fix multiple symbols definitions with UVC gadget and host drivers 2010-07-11 17:45:10 -03:00
uwb
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2010-07-07 19:56:00 -07:00
video drivers/video/nuc900fb.c: fix lcd build error 2010-06-29 15:29:32 -07:00
virtio virtio-pci: disable msi at startup 2010-06-23 22:49:07 +09:30
vlynq
w1 sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
watchdog watchdog: at32ap700x_wdt: register misc device last in probe() function 2010-06-17 09:56:57 +00:00
xen xen: avoid allocation causing potential swap activity on the resume path 2010-06-03 09:34:45 +01:00
zorro sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
Kconfig
Makefile intel_idle: native hardware cpuidle driver for latest Intel processors 2010-05-28 14:26:20 -04:00