41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
|
--- xorg-server-1.1.1/hw/xfree86/os-support/bus/Pci.c.jx 2007-02-12 11:08:52.000000000 -0500
|
||
|
+++ xorg-server-1.1.1/hw/xfree86/os-support/bus/Pci.c 2007-03-30 12:20:08.000000000 -0400
|
||
|
@@ -231,14 +231,14 @@
|
||
|
int pciMaxBusNum = MAX_PCI_BUSES;
|
||
|
static Bool inProbe = FALSE;
|
||
|
|
||
|
-static pciConfigPtr pci_devp[MAX_PCI_DEVICES + 1] = {NULL, };
|
||
|
+static pciConfigPtr *pci_devp = NULL;
|
||
|
|
||
|
static int readPciBios( PCITAG Tag, CARD8* tmp, ADDRESS hostbase,
|
||
|
unsigned char * buf, int len, PciBiosType BiosType );
|
||
|
|
||
|
static int (*pciOSHandleBIOS)(PCITAG Tag, int basereg, unsigned char *buf, int len);
|
||
|
|
||
|
-int xf86MaxPciDevs = MAX_PCI_DEVICES;
|
||
|
+int xf86MaxPciDevs = 0;
|
||
|
|
||
|
/*
|
||
|
* Platform specific PCI function pointers.
|
||
|
@@ -271,6 +271,11 @@
|
||
|
if (pciNumBuses <= 0)
|
||
|
ARCH_PCI_OS_INIT();
|
||
|
#endif
|
||
|
+ if (xf86MaxPciDevs == 0)
|
||
|
+ xf86MaxPciDevs = MAX_PCI_DEVICES; /* XXX bogus */
|
||
|
+ if (pci_devp)
|
||
|
+ xfree(pci_devp);
|
||
|
+ pci_devp = xnfcalloc(xf86MaxPciDevs + 1, sizeof(pciConfigPtr));
|
||
|
}
|
||
|
|
||
|
void pciSetOSBIOSPtr(int (*bios_fn)(PCITAG Tag, int basereg, unsigned char * buf, int len))
|
||
|
@@ -913,7 +918,7 @@
|
||
|
* result in an endless recursion if platform/OS specific PCI
|
||
|
* bus probing code calls this function from with in it.
|
||
|
*/
|
||
|
- if (done || pci_devp[0])
|
||
|
+ if (done || pci_devp)
|
||
|
return pci_devp;
|
||
|
|
||
|
done = TRUE;
|