[FORMATTING]

Fix indentation. No code changes!

svn path=/trunk/; revision=61085
This commit is contained in:
Eric Kohl 2013-11-23 22:08:48 +00:00
parent e5769b0d38
commit f09cfef7f5
4 changed files with 2251 additions and 2204 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -7,100 +7,101 @@
typedef struct _PCI_DEVICE typedef struct _PCI_DEVICE
{ {
// Entry on device list // Entry on device list
LIST_ENTRY ListEntry; LIST_ENTRY ListEntry;
// Physical Device Object of device // Physical Device Object of device
PDEVICE_OBJECT Pdo; PDEVICE_OBJECT Pdo;
// PCI bus number // PCI bus number
ULONG BusNumber; ULONG BusNumber;
// PCI slot number // PCI slot number
PCI_SLOT_NUMBER SlotNumber; PCI_SLOT_NUMBER SlotNumber;
// PCI configuration data // PCI configuration data
PCI_COMMON_CONFIG PciConfig; PCI_COMMON_CONFIG PciConfig;
// Enable memory space // Enable memory space
BOOLEAN EnableMemorySpace; BOOLEAN EnableMemorySpace;
// Enable I/O space // Enable I/O space
BOOLEAN EnableIoSpace; BOOLEAN EnableIoSpace;
// Enable bus master // Enable bus master
BOOLEAN EnableBusMaster; BOOLEAN EnableBusMaster;
} PCI_DEVICE, *PPCI_DEVICE; } PCI_DEVICE, *PPCI_DEVICE;
typedef enum { typedef enum
dsStopped, {
dsStarted, dsStopped,
dsPaused, dsStarted,
dsRemoved, dsPaused,
dsSurpriseRemoved dsRemoved,
dsSurpriseRemoved
} PCI_DEVICE_STATE; } PCI_DEVICE_STATE;
typedef struct _COMMON_DEVICE_EXTENSION typedef struct _COMMON_DEVICE_EXTENSION
{ {
// Pointer to device object, this device extension is associated with // Pointer to device object, this device extension is associated with
PDEVICE_OBJECT DeviceObject; PDEVICE_OBJECT DeviceObject;
// Wether this device extension is for an FDO or PDO // Wether this device extension is for an FDO or PDO
BOOLEAN IsFDO; BOOLEAN IsFDO;
// Wether the device is removed // Wether the device is removed
BOOLEAN Removed; BOOLEAN Removed;
// Current device power state for the device // Current device power state for the device
DEVICE_POWER_STATE DevicePowerState; DEVICE_POWER_STATE DevicePowerState;
} COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION; } COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION;
/* Physical Device Object device extension for a child device */ /* Physical Device Object device extension for a child device */
typedef struct _PDO_DEVICE_EXTENSION typedef struct _PDO_DEVICE_EXTENSION
{ {
// Common device data // Common device data
COMMON_DEVICE_EXTENSION Common; COMMON_DEVICE_EXTENSION Common;
// Functional device object // Functional device object
PDEVICE_OBJECT Fdo; PDEVICE_OBJECT Fdo;
// Pointer to PCI Device informations // Pointer to PCI Device informations
PPCI_DEVICE PciDevice; PPCI_DEVICE PciDevice;
// Device ID // Device ID
UNICODE_STRING DeviceID; UNICODE_STRING DeviceID;
// Instance ID // Instance ID
UNICODE_STRING InstanceID; UNICODE_STRING InstanceID;
// Hardware IDs // Hardware IDs
UNICODE_STRING HardwareIDs; UNICODE_STRING HardwareIDs;
// Compatible IDs // Compatible IDs
UNICODE_STRING CompatibleIDs; UNICODE_STRING CompatibleIDs;
// Textual description of device // Textual description of device
UNICODE_STRING DeviceDescription; UNICODE_STRING DeviceDescription;
// Textual description of device location // Textual description of device location
UNICODE_STRING DeviceLocation; UNICODE_STRING DeviceLocation;
// Number of interfaces references // Number of interfaces references
LONG References; LONG References;
} PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION; } PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION;
/* Functional Device Object device extension for the PCI driver device object */ /* Functional Device Object device extension for the PCI driver device object */
typedef struct _FDO_DEVICE_EXTENSION typedef struct _FDO_DEVICE_EXTENSION
{ {
// Common device data // Common device data
COMMON_DEVICE_EXTENSION Common; COMMON_DEVICE_EXTENSION Common;
// Entry on device list // Entry on device list
LIST_ENTRY ListEntry; LIST_ENTRY ListEntry;
// PCI bus number serviced by this FDO // PCI bus number serviced by this FDO
ULONG BusNumber; ULONG BusNumber;
// Current state of the driver // Current state of the driver
PCI_DEVICE_STATE State; PCI_DEVICE_STATE State;
// Namespace device list // Namespace device list
LIST_ENTRY DeviceListHead; LIST_ENTRY DeviceListHead;
// Number of (not removed) devices in device list // Number of (not removed) devices in device list
ULONG DeviceListCount; ULONG DeviceListCount;
// Lock for namespace device list // Lock for namespace device list
KSPIN_LOCK DeviceListLock; KSPIN_LOCK DeviceListLock;
// Lower device object // Lower device object
PDEVICE_OBJECT Ldo; PDEVICE_OBJECT Ldo;
} FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION; } FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION;
/* Driver extension associated with PCI driver */ /* Driver extension associated with PCI driver */
typedef struct _PCI_DRIVER_EXTENSION typedef struct _PCI_DRIVER_EXTENSION
{ {
// //
LIST_ENTRY BusListHead; LIST_ENTRY BusListHead;
// Lock for namespace bus list // Lock for namespace bus list
KSPIN_LOCK BusListLock; KSPIN_LOCK BusListLock;
} PCI_DRIVER_EXTENSION, *PPCI_DRIVER_EXTENSION; } PCI_DRIVER_EXTENSION, *PPCI_DRIVER_EXTENSION;
@ -113,66 +114,66 @@ extern PPCI_DRIVER_EXTENSION DriverExtension;
NTSTATUS NTSTATUS
FdoPnpControl( FdoPnpControl(
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
PIRP Irp); PIRP Irp);
NTSTATUS NTSTATUS
FdoPowerControl( FdoPowerControl(
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
PIRP Irp); PIRP Irp);
/* pci.c */ /* pci.c */
NTSTATUS NTSTATUS
PciCreateDeviceIDString( PciCreateDeviceIDString(
PUNICODE_STRING DeviceID, PUNICODE_STRING DeviceID,
PPCI_DEVICE Device); PPCI_DEVICE Device);
NTSTATUS NTSTATUS
PciCreateInstanceIDString( PciCreateInstanceIDString(
PUNICODE_STRING InstanceID, PUNICODE_STRING InstanceID,
PPCI_DEVICE Device); PPCI_DEVICE Device);
NTSTATUS NTSTATUS
PciCreateHardwareIDsString( PciCreateHardwareIDsString(
PUNICODE_STRING HardwareIDs, PUNICODE_STRING HardwareIDs,
PPCI_DEVICE Device); PPCI_DEVICE Device);
NTSTATUS NTSTATUS
PciCreateCompatibleIDsString( PciCreateCompatibleIDsString(
PUNICODE_STRING HardwareIDs, PUNICODE_STRING HardwareIDs,
PPCI_DEVICE Device); PPCI_DEVICE Device);
NTSTATUS NTSTATUS
PciCreateDeviceDescriptionString( PciCreateDeviceDescriptionString(
PUNICODE_STRING DeviceDescription, PUNICODE_STRING DeviceDescription,
PPCI_DEVICE Device); PPCI_DEVICE Device);
NTSTATUS NTSTATUS
PciCreateDeviceLocationString( PciCreateDeviceLocationString(
PUNICODE_STRING DeviceLocation, PUNICODE_STRING DeviceLocation,
PPCI_DEVICE Device); PPCI_DEVICE Device);
NTSTATUS NTSTATUS
PciDuplicateUnicodeString( PciDuplicateUnicodeString(
IN ULONG Flags, IN ULONG Flags,
IN PCUNICODE_STRING SourceString, IN PCUNICODE_STRING SourceString,
OUT PUNICODE_STRING DestinationString); OUT PUNICODE_STRING DestinationString);
/* pdo.c */ /* pdo.c */
NTSTATUS NTSTATUS
PdoPnpControl( PdoPnpControl(
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
PIRP Irp); PIRP Irp);
NTSTATUS NTSTATUS
PdoPowerControl( PdoPowerControl(
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
PIRP Irp); PIRP Irp);
NTSTATUS NTSTATUS
NTAPI NTAPI
DriverEntry( DriverEntry(
IN PDRIVER_OBJECT DriverObject, IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath); IN PUNICODE_STRING RegistryPath);

File diff suppressed because it is too large Load diff