summaryrefslogtreecommitdiff
path: root/arch/x86/pci
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2008-07-12 01:21:17 +0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-07-15 01:23:28 +0400
commitbeef3129b3afb74817acff72fda4a9d951e3973e (patch)
treea2f462b777852aa5f4a0558dadd3390c64f32e62 /arch/x86/pci
parentf7a1b86095bf7fd1578ef54067545b9cb7084713 (diff)
downloadlinux-beef3129b3afb74817acff72fda4a9d951e3973e.tar.xz
x86/PCI: Fix PCI config space for domains > 0
John Keller reports that PCI config space access is broken on machines with more than one domain. conf1 accesses only work for domain 0, so make sure we check the domain number in the raw routines before trying conf1. Reported-by: John Keller <jpk@sgi.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci')
-rw-r--r--arch/x86/pci/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index d19fd07bafd6..86aff81a0829 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -32,7 +32,7 @@ struct pci_raw_ops *raw_pci_ext_ops;
int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
int reg, int len, u32 *val)
{
- if (reg < 256 && raw_pci_ops)
+ if (domain == 0 && reg < 256 && raw_pci_ops)
return raw_pci_ops->read(domain, bus, devfn, reg, len, val);
if (raw_pci_ext_ops)
return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val);
@@ -42,7 +42,7 @@ int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn,
int reg, int len, u32 val)
{
- if (reg < 256 && raw_pci_ops)
+ if (domain == 0 && reg < 256 && raw_pci_ops)
return raw_pci_ops->write(domain, bus, devfn, reg, len, val);
if (raw_pci_ext_ops)
return raw_pci_ext_ops->write(domain, bus, devfn, reg, len, val);