ReactOS  0.4.13-dev-66-gc714b7f
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 
18 BOOLEAN
19 NTAPI
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 IN
Definition: typedefs.h:38
#define PAGED_CODE()
Definition: video.h:57
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
unsigned char BOOLEAN
BOOLEAN NTAPI PciAreBusNumbersConfigured(IN PPCI_PDO_EXTENSION PdoExtension)
Definition: busno.c:20
unsigned char UCHAR
Definition: xmlstorage.h:181