ReactOS 0.4.15-dev-7924-g5949c20
busno.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS PCI Bus Driver
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/bus/pci/pci/busno.c
5 * PURPOSE: Bus Number Management
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9/* INCLUDES *******************************************************************/
10
11#include <pci.h>
12
13#define NDEBUG
14#include <debug.h>
15
16/* FUNCTIONS ******************************************************************/
17
21{
22 UCHAR PrimaryBus, BaseBus, SecondaryBus, SubordinateBus;
23
24 PAGED_CODE();
25
26 /* Get all relevant bus number details */
27 PrimaryBus = PdoExtension->Dependent.type1.PrimaryBus;
28 BaseBus = PdoExtension->ParentFdoExtension->BaseBus;
29 SecondaryBus = PdoExtension->Dependent.type1.SecondaryBus;
30 SubordinateBus = PdoExtension->Dependent.type1.SubordinateBus;
31
32 /* The primary bus should be the base bus of the parent */
33 if ((PrimaryBus != BaseBus) || (SecondaryBus <= PrimaryBus)) return FALSE;
34
35 /* The subordinate should be a higher bus number than the secondary */
36 return SubordinateBus >= SecondaryBus;
37}
38
39/* EOF */
#define PAGED_CODE()
unsigned char BOOLEAN
BOOLEAN NTAPI PciAreBusNumbersConfigured(IN PPCI_PDO_EXTENSION PdoExtension)
Definition: busno.c:20
#define FALSE
Definition: types.h:117
@ PdoExtension
Definition: precomp.h:49
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
unsigned char UCHAR
Definition: xmlstorage.h:181