aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/int10/xf86int10.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 19:39:46 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 19:39:46 +0000
commit4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (patch)
treec1e02b9d3509aa97703aa4b540d4cd22ec4600ed /xorg-server/hw/xfree86/int10/xf86int10.c
parentdc3c299dd0995549e2a6973ca0f25b254afd38a5 (diff)
downloadvcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.gz
vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.bz2
vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.zip
Added xorg-server-1.6.2.tar.gz
Diffstat (limited to 'xorg-server/hw/xfree86/int10/xf86int10.c')
-rw-r--r--xorg-server/hw/xfree86/int10/xf86int10.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/xorg-server/hw/xfree86/int10/xf86int10.c b/xorg-server/hw/xfree86/int10/xf86int10.c
index f50607cfc..51eb91fbb 100644
--- a/xorg-server/hw/xfree86/int10/xf86int10.c
+++ b/xorg-server/hw/xfree86/int10/xf86int10.c
@@ -655,6 +655,32 @@ find_pci_class(CARD8 intf, CARD8 subClass, CARD16 _class,
}
#endif
+/*
+ * Return the last bus number in the same domain as dev. Only look at the
+ * one domain since this is going into %cl, and VGA I/O is per-domain anyway.
+ */
+static int
+int1A_last_bus_number(struct pci_device *dev)
+{
+ struct pci_device *d;
+ struct pci_slot_match m = { dev->domain,
+ PCI_MATCH_ANY,
+ PCI_MATCH_ANY,
+ PCI_MATCH_ANY };
+ struct pci_device_iterator *iter;
+ int i = 0;
+
+ iter = pci_slot_match_iterator_create(&m);
+
+ while ((d = pci_device_next(iter)))
+ if (d->bus > i)
+ i = d->bus;
+
+ pci_iterator_destroy(iter);
+
+ return i;
+}
+
static int
int1A_handler(xf86Int10InfoPtr pInt)
{
@@ -674,7 +700,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
X86_EDX = 0x20494350; /* " ICP" */
X86_EBX = 0x0210; /* Version 2.10 */
X86_ECX &= 0xFF00;
- X86_ECX |= (pciNumBuses & 0xFF); /* Max bus number in system */
+ X86_ECX |= int1A_last_bus_number(pvp);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
#ifdef PRINT_INT
ErrorF("ax=0x%x dx=0x%x bx=0x%x cx=0x%x flags=0x%x\n",