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>
This commit is contained in:
parent
f7a1b86095
commit
beef3129b3
|
@ -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 raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
|
||||||
int reg, int len, u32 *val)
|
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);
|
return raw_pci_ops->read(domain, bus, devfn, reg, len, val);
|
||||||
if (raw_pci_ext_ops)
|
if (raw_pci_ext_ops)
|
||||||
return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val);
|
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 raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn,
|
||||||
int reg, int len, u32 val)
|
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);
|
return raw_pci_ops->write(domain, bus, devfn, reg, len, val);
|
||||||
if (raw_pci_ext_ops)
|
if (raw_pci_ext_ops)
|
||||||
return raw_pci_ext_ops->write(domain, bus, devfn, reg, len, val);
|
return raw_pci_ext_ops->write(domain, bus, devfn, reg, len, val);
|
||||||
|
|
Loading…
Reference in New Issue