ReactOS  0.4.13-dev-651-g5dbc677
busno.c File Reference
#include <pci.h>
#include <debug.h>
Include dependency graph for busno.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

BOOLEAN NTAPI PciAreBusNumbersConfigured (IN PPCI_PDO_EXTENSION PdoExtension)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file busno.c.

Function Documentation

◆ PciAreBusNumbersConfigured()

BOOLEAN NTAPI PciAreBusNumbersConfigured ( IN PPCI_PDO_EXTENSION  PdoExtension)

Definition at line 20 of file busno.c.

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 }
#define PAGED_CODE()
Definition: video.h:57
unsigned char UCHAR
Definition: xmlstorage.h:181

Referenced by PciAddDevice().