mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 07:38:22 +02:00
//bugs.freedesktop.org/show_bug.cgi?id=1963) attachment #1424
(https://bugs.freedesktop.org/attachment.cgi?id=1424): 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. Patch by Egbert Eich <eich@freedesktop.org>
This commit is contained in:
parent
b6b4d6b342
commit
96d65874af
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue