mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-27 02:09:56 +00:00
When we can, bound the maximum number of PCI devices to attempt to scan, by
the number found on the system. Only implemented for Linux right now.
This commit is contained in:
parent
11cf4d2fde
commit
8444bb77c9
5 changed files with 36 additions and 3 deletions
|
|
@ -238,6 +238,8 @@ static int readPciBios( PCITAG Tag, CARD8* tmp, ADDRESS hostbase,
|
|||
|
||||
static int (*pciOSHandleBIOS)(PCITAG Tag, int basereg, unsigned char *buf, int len);
|
||||
|
||||
int xf86MaxPciDevs = MAX_PCI_DEVICES;
|
||||
|
||||
/*
|
||||
* Platform specific PCI function pointers.
|
||||
*
|
||||
|
|
@ -938,7 +940,7 @@ xf86scanpci(int flags)
|
|||
xf86MsgVerb(X_INFO, 2, "PCI: PCI scan (all values are in hex)\n");
|
||||
#endif
|
||||
|
||||
while (idx < MAX_PCI_DEVICES && tag != PCI_NOT_FOUND) {
|
||||
while (idx < xf86MaxPciDevs && tag != PCI_NOT_FOUND) {
|
||||
devp = xcalloc(1, sizeof(pciDevice));
|
||||
if (!devp) {
|
||||
xf86Msg(X_ERROR,
|
||||
|
|
@ -1001,6 +1003,8 @@ xf86scanpci(int flags)
|
|||
#endif
|
||||
|
||||
pci_devp[idx++] = devp;
|
||||
if (idx == xf86MaxPciDevs)
|
||||
break;
|
||||
tag = pciFindNext();
|
||||
|
||||
#ifdef DEBUGPCI
|
||||
|
|
|
|||
Loading…
Reference in a new issue