Read number of PCI buses returned by BIOS so that we can scan more

quickly.
This commit is contained in:
Michael Brown
2005-04-16 11:16:31 +00:00
parent e1a9798af4
commit 6e5a3858bf
3 changed files with 37 additions and 12 deletions

View File

@@ -9,6 +9,13 @@
DEV_BUS( struct pci_device, pci_dev );
static char pci_magic[0]; /* guaranteed unique symbol */
/*
* pci_io.c may know how many buses we have, in which case it can
* overwrite this value.
*
*/
unsigned int pci_max_bus = 0xff;
/*
* Fill in parameters (vendor & device ids, class, membase etc.) for a
* PCI device based on bus & devfn.
@@ -18,6 +25,10 @@ static char pci_magic[0]; /* guaranteed unique symbol */
static int fill_pci_device ( struct pci_device *pci ) {
uint32_t l;
int reg;
/* Check bus is within range */
if ( PCI_BUS ( pci->busdevfn ) > pci_max_bus )
return 0;
/* Check to see if there's anything physically present.
*/