diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-03-23 18:20:38 +0100 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-03-23 18:20:38 +0100 |
commit | 0961a8be2d15e4888b04007f79aa23607a5bcc57 (patch) | |
tree | 6dc092c116de3dc5635bbde8ca8f3d82cd7b1842 /com32/lib/pci/scan.c | |
parent | 66a0dfe708020688ff8a3d0c2f15b2febc129139 (diff) | |
download | syslinux-0961a8be2d15e4888b04007f79aa23607a5bcc57.tar.gz |
pci: Check if configuration type is PCI_CFG_NONE
Impact: prevent from grabbing configuration when PCI is PCI_CFG_NONE
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
Diffstat (limited to 'com32/lib/pci/scan.c')
-rw-r--r-- | com32/lib/pci/scan.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/com32/lib/pci/scan.c b/com32/lib/pci/scan.c index f73853f6..adfec596 100644 --- a/com32/lib/pci/scan.c +++ b/com32/lib/pci/scan.c @@ -443,6 +443,10 @@ 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 +523,10 @@ void gather_additional_pci_config(struct pci_domain *domain) 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; |