reactos/drivers/bus/pcix/pci/busno.c
Sylvain Petreolle 1fb94b1cb5 [CMAKE]
sync with trunk (r49230)

svn path=/branches/cmake-bringup/; revision=49246
2010-10-23 22:14:59 +00:00

39 lines
1.3 KiB
C

/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pci/busno.c
* PURPOSE: Bus Number Management
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
BOOLEAN
NTAPI
PciAreBusNumbersConfigured(IN PPCI_PDO_EXTENSION PdoExtension)
{
PAGED_CODE();
UCHAR PrimaryBus, BaseBus, SecondaryBus, SubordinateBus;
/* Get all relevant bus number details */
PrimaryBus = PdoExtension->Dependent.type1.PrimaryBus;
BaseBus = PdoExtension->ParentFdoExtension->BaseBus;
SecondaryBus = PdoExtension->Dependent.type1.SecondaryBus;
SubordinateBus = PdoExtension->Dependent.type1.SubordinateBus;
/* The primary bus should be the base bus of the parent */
if ((PrimaryBus != BaseBus) || (SecondaryBus <= PrimaryBus)) return FALSE;
/* The subordinate should be a higher bus number than the secondary */
return SubordinateBus >= SecondaryBus;
}
/* EOF */