summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-11-30 08:38:44 +0000
committerEgbert Eich <eich@suse.de>2004-11-30 08:38:44 +0000
commitaf717ae57dd6c5e6ad41b4142d62cdbb55f13777 (patch)
treebed12aaace213bfcaa30b6b8d34ae3a24a02a15c
parent59ccc6465ca15e046ad11362ae5fbb3c71d2c148 (diff)
Make Xorg the default server to install.
Avoid PIO access on IA64. Some IA64 machine check if legacy ports outside the VGA range are accessed. The ATi driver however does this to probe for ISA Mach8/32/64. Since no IA64 has ISA slots this restriction should not be relevant to the user. Avoid recursive calls of xf86scanpci(). This function normally detects that it has been called before by checking if the PCI structure is filled out. So far if this was not the case (because PCI probing has failed for some reason) the function is traversed again. With the chipset specific PCI bus probing this can lead to an endless recursive loop as the post-probing code calls xf86scanpci() from within this function. The OS specific PCI code for Linux worked only if bus 0 was populated as it checked for the presence of /proc/bus/pci/00. Fixed to check for /proc/bus/pci/<bus_to_look_for> instead.
-rw-r--r--hw/xfree86/os-support/bus/Pci.c5
-rw-r--r--hw/xfree86/os-support/bus/linuxPci.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c
index ffa906505..4bc189bbd 100644
--- a/hw/xfree86/os-support/bus/Pci.c
+++ b/hw/xfree86/os-support/bus/Pci.c
@@ -954,10 +954,13 @@ xf86scanpci(int flags)
pciBusInfo_t *busp;
int idx = 0, i;
PCITAG tag;
+ static Bool done = FALSE;
- if (pci_devp[0])
+ if (done || pci_devp[0])
return pci_devp;
+ done = TRUE;
+
pciInit();
#ifdef XF86SCANPCI_WRAPPER
diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c
index 6e33c2550..146dccfd3 100644
--- a/hw/xfree86/os-support/bus/linuxPci.c
+++ b/hw/xfree86/os-support/bus/linuxPci.c
@@ -113,14 +113,16 @@ linuxPciOpenFile(PCITAG tag)
if (fd != -1)
close(fd);
if (bus < 256) {
- if (stat("/proc/bus/pci/00", &ignored) < 0)
+ sprintf(file,"/proc/bus/pci/%02x",bus);
+ if (stat(file, &ignored) < 0)
sprintf(file, "/proc/bus/pci/0000:%02x/%02x.%1x",
bus, dev, func);
else
sprintf(file, "/proc/bus/pci/%02x/%02x.%1x",
bus, dev, func);
} else {
- if (stat("/proc/bus/pci/00", &ignored) < 0)
+ sprintf(file,"/proc/bus/pci/%04x",bus);
+ if (stat(file, &ignored) < 0)
sprintf(file, "/proc/bus/pci/0000:%04x/%02x.%1x",
bus, dev, func);
else