aboutsummaryrefslogtreecommitdiffstats
path: root/xen/drivers/pci
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2011-09-22 18:29:19 +0100
committerJan Beulich <jbeulich@suse.com>2011-09-22 18:29:19 +0100
commite463d3619896fc257906d08d0a2b40474ea19e80 (patch)
tree2ecfde918587630f0f22766ca53ed350392b8100 /xen/drivers/pci
parent9be30410ecd3a01ff9315f77abb0c8865c927df2 (diff)
downloadxen-e463d3619896fc257906d08d0a2b40474ea19e80.tar.gz
xen-e463d3619896fc257906d08d0a2b40474ea19e80.tar.bz2
xen-e463d3619896fc257906d08d0a2b40474ea19e80.zip
PCI multi-seg: config space accessor adjustments
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/drivers/pci')
-rw-r--r--xen/drivers/pci/pci.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/xen/drivers/pci/pci.c b/xen/drivers/pci/pci.c
index 278f6b536d..9a15e8fd28 100644
--- a/xen/drivers/pci/pci.c
+++ b/xen/drivers/pci/pci.c
@@ -7,25 +7,25 @@
#include <xen/pci.h>
#include <xen/pci_regs.h>
-int pci_find_cap_offset(u8 bus, u8 dev, u8 func, u8 cap)
+int pci_find_cap_offset(u16 seg, u8 bus, u8 dev, u8 func, u8 cap)
{
u8 id;
int max_cap = 48;
u8 pos = PCI_CAPABILITY_LIST;
u16 status;
- status = pci_conf_read16(bus, dev, func, PCI_STATUS);
+ status = pci_conf_read16(seg, bus, dev, func, PCI_STATUS);
if ( (status & PCI_STATUS_CAP_LIST) == 0 )
return 0;
while ( max_cap-- )
{
- pos = pci_conf_read8(bus, dev, func, pos);
+ pos = pci_conf_read8(seg, bus, dev, func, pos);
if ( pos < 0x40 )
break;
pos &= ~3;
- id = pci_conf_read8(bus, dev, func, pos + PCI_CAP_LIST_ID);
+ id = pci_conf_read8(seg, bus, dev, func, pos + PCI_CAP_LIST_ID);
if ( id == 0xff )
break;
@@ -38,19 +38,19 @@ int pci_find_cap_offset(u8 bus, u8 dev, u8 func, u8 cap)
return 0;
}
-int pci_find_next_cap(u8 bus, unsigned int devfn, u8 pos, int cap)
+int pci_find_next_cap(u16 seg, u8 bus, unsigned int devfn, u8 pos, int cap)
{
u8 id;
int ttl = 48;
while ( ttl-- )
{
- pos = pci_conf_read8(bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos);
+ pos = pci_conf_read8(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pos);
if ( pos < 0x40 )
break;
pos &= ~3;
- id = pci_conf_read8(bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
+ id = pci_conf_read8(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
pos + PCI_CAP_LIST_ID);
if ( id == 0xff )