[syslinux] [PATCH 2/3] pci: check for cfgtype == PCI_CFG_NONE
Sebastian Herbszt
herbszt at gmx.de
Sun Mar 22 12:48:35 PDT 2009
Check if configuration type is PCI_CFG_NONE.
- Sebastian
Index: syslinux-3.74-pre11-2-g4fc8259/com32/lib/pci/scan.c
===================================================================
--- syslinux-3.74-pre11-2-g4fc8259.orig/com32/lib/pci/scan.c
+++ syslinux-3.74-pre11-2-g4fc8259/com32/lib/pci/scan.c
@@ -443,6 +443,9 @@ struct pci_domain *pci_scan(void)
cfgtype = pci_set_config_type(PCI_CFG_AUTO);
dprintf("PCI configuration type %d\n", cfgtype);
+ if (cfgtype == PCI_CFG_NONE)
+ return NULL;
+
dprintf("Scanning PCI Buses\n");
for (nbus = 0; nbus < MAX_PCI_BUSES; nbus++) {
@@ -519,7 +522,10 @@ void gather_additional_pci_config(struct
unsigned int nbus, ndev, nfunc, maxfunc;
pciaddr_t a;
int cfgtype;
+
cfgtype = pci_set_config_type(PCI_CFG_AUTO);
+ if (cfgtype == PCI_CFG_NONE)
+ return;
for (nbus = 0; nbus < MAX_PCI_BUSES; nbus++) {
bus = NULL;
More information about the Syslinux
mailing list