[syslinux] [PATCH] pci: resize pci_device arrays

Sebastian Herbszt herbszt at gmx.de
Thu Jul 17 15:18:52 PDT 2008


pci_bus->pci_device get's populated with functions so it
should take up to MAX_PCI_DEVICES * MAX_PCI_FUNC elements.
pci_device_list->pci_device get's populated with functions
for every possible pci bus. Therefore it should take up to
MAX_PCI_BUS * MAX_PCI_DEVICES * MAX_PCI_FUNC elements.

- Sebastian

Index: syslinux-3.71-pre14-6-g6a9f2f3/com32/include/sys/pci.h
===================================================================
--- syslinux-3.71-pre14-6-g6a9f2f3.orig/com32/include/sys/pci.h	2008-07-17 23:18:53.000000000 +0200
+++ syslinux-3.71-pre14-6-g6a9f2f3/com32/include/sys/pci.h	2008-07-17 23:18:55.000000000 +0200
@@ -29,12 +29,12 @@
 
 struct pci_bus {
 	uint16_t id;
-	struct pci_device *pci_device[MAX_PCI_DEVICES];
+	struct pci_device *pci_device[MAX_PCI_DEVICES * MAX_PCI_FUNC];
 	uint8_t pci_device_count;
 };
 
 struct pci_device_list {
-	struct pci_device pci_device[MAX_PCI_DEVICES];
+	struct pci_device pci_device[MAX_PCI_BUSES * MAX_PCI_DEVICES * MAX_PCI_FUNC];
 	uint8_t count;
 };
 




More information about the Syslinux mailing list