diff options
| author | Michael Brown | 2011-02-12 03:08:28 +0100 |
|---|---|---|
| committer | Michael Brown | 2011-02-17 02:25:11 +0100 |
| commit | abb5590b297076f071b72f347d8d3204163e097b (patch) | |
| tree | b526d735f41a850977edce756f8f7c1020d35ccd /src/arch/i386/interface/pcbios | |
| parent | [pci] Use single "busdevfn" field in struct pci_device (diff) | |
| download | ipxe-abb5590b297076f071b72f347d8d3204163e097b.tar.gz ipxe-abb5590b297076f071b72f347d8d3204163e097b.tar.xz ipxe-abb5590b297076f071b72f347d8d3204163e097b.zip | |
[pci] Replace pci_max_bus() with pci_num_bus()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/interface/pcbios')
| -rw-r--r-- | src/arch/i386/interface/pcbios/pcibios.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/arch/i386/interface/pcbios/pcibios.c b/src/arch/i386/interface/pcbios/pcibios.c index 9f69fe6e4..511ec6232 100644 --- a/src/arch/i386/interface/pcbios/pcibios.c +++ b/src/arch/i386/interface/pcbios/pcibios.c @@ -29,11 +29,11 @@ FILE_LICENCE ( GPL2_OR_LATER ); */ /** - * Determine maximum PCI bus number within system + * Determine number of PCI buses within system * - * @ret max_bus Maximum bus number + * @ret num_bus Number of buses */ -static int pcibios_max_bus ( void ) { +static int pcibios_num_bus ( void ) { int discard_a, discard_D; uint8_t max_bus; @@ -48,7 +48,7 @@ static int pcibios_max_bus ( void ) { "D" ( 0 ) : "ebx", "edx" ); - return max_bus; + return ( max_bus + 1 ); } /** @@ -105,7 +105,7 @@ int pcibios_write ( struct pci_device *pci, uint32_t command, uint32_t value ){ return ( ( status >> 8 ) & 0xff ); } -PROVIDE_PCIAPI ( pcbios, pci_max_bus, pcibios_max_bus ); +PROVIDE_PCIAPI ( pcbios, pci_num_bus, pcibios_num_bus ); PROVIDE_PCIAPI_INLINE ( pcbios, pci_read_config_byte ); PROVIDE_PCIAPI_INLINE ( pcbios, pci_read_config_word ); PROVIDE_PCIAPI_INLINE ( pcbios, pci_read_config_dword ); |
