Commit a557aae2 authored by Yinghai Lu's avatar Yinghai Lu Committed by H. Peter Anvin

x86/pci: Intel ioh bus num reg accessing fix

It is above 0x100 (PCI-Express extended register space), so if mmconf
is not enable, we can't access it.

[ hpa: changed the bound from 0x200 to 0x120, which is the tight
  bound. ]
Reported-by: default avatarJens Axboe <jens.axboe@oracle.com>
Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
LKML-Reference: <1261525263-13763-3-git-send-email-yinghai@kernel.org>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 9dad0fd5
...@@ -49,6 +49,10 @@ static void __devinit pci_root_bus_res(struct pci_dev *dev) ...@@ -49,6 +49,10 @@ static void __devinit pci_root_bus_res(struct pci_dev *dev)
u64 mmioh_base, mmioh_end; u64 mmioh_base, mmioh_end;
int bus_base, bus_end; int bus_base, bus_end;
/* some sys doesn't get mmconf enabled */
if (dev->cfg_size < 0x120)
return;
if (pci_root_num >= PCI_ROOT_NR) { if (pci_root_num >= PCI_ROOT_NR) {
printk(KERN_DEBUG "intel_bus.c: PCI_ROOT_NR is too small\n"); printk(KERN_DEBUG "intel_bus.c: PCI_ROOT_NR is too small\n");
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment