mirror of
https://github.com/reactos/reactos.git
synced 2024-09-08 03:40:17 +00:00
114 lines
1.9 KiB
C
114 lines
1.9 KiB
C
![]() |
/*
|
||
|
* PROJECT: ReactOS Storport Driver
|
||
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||
|
* PURPOSE: Storport driver common header file
|
||
|
* COPYRIGHT: Copyright 2017 Eric Kohl (eric.kohl@reactos.org)
|
||
|
*/
|
||
|
|
||
|
#ifndef _STORPORT_PCH_
|
||
|
#define _STORPORT_PCH_
|
||
|
|
||
|
#include <wdm.h>
|
||
|
#include <ntddk.h>
|
||
|
#include <stdio.h>
|
||
|
#include <storport.h>
|
||
|
#include <ntddscsi.h>
|
||
|
#include <ntdddisk.h>
|
||
|
#include <mountdev.h>
|
||
|
|
||
|
typedef enum
|
||
|
{
|
||
|
dsStopped,
|
||
|
dsStarted,
|
||
|
dsPaused,
|
||
|
dsRemoved,
|
||
|
dsSurpriseRemoved
|
||
|
} DEVICE_STATE;
|
||
|
|
||
|
typedef enum
|
||
|
{
|
||
|
InvalidExtension = 0,
|
||
|
DriverExtension,
|
||
|
FdoExtension,
|
||
|
PdoExtension
|
||
|
} EXTENSION_TYPE;
|
||
|
|
||
|
typedef struct _DRIVER_OBJECT_EXTENSION
|
||
|
{
|
||
|
EXTENSION_TYPE ExtensionType;
|
||
|
|
||
|
PDRIVER_OBJECT DriverObject;
|
||
|
|
||
|
KSPIN_LOCK AdapterListLock;
|
||
|
LIST_ENTRY AdapterListHead;
|
||
|
ULONG AdapterCount;
|
||
|
|
||
|
} DRIVER_OBJECT_EXTENSION, *PDRIVER_OBJECT_EXTENSION;
|
||
|
|
||
|
typedef struct _FDO_DEVICE_EXTENSION
|
||
|
{
|
||
|
EXTENSION_TYPE ExtensionType;
|
||
|
|
||
|
PDEVICE_OBJECT Device;
|
||
|
PDEVICE_OBJECT LowerDevice;
|
||
|
PDEVICE_OBJECT PhysicalDevice;
|
||
|
|
||
|
DEVICE_STATE PnpState;
|
||
|
|
||
|
LIST_ENTRY AdapterListEntry;
|
||
|
} FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION;
|
||
|
|
||
|
|
||
|
typedef struct _PDO_DEVICE_EXTENSION
|
||
|
{
|
||
|
EXTENSION_TYPE ExtensionType;
|
||
|
|
||
|
PDEVICE_OBJECT AttachedFdo;
|
||
|
|
||
|
DEVICE_STATE PnpState;
|
||
|
|
||
|
} PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION;
|
||
|
|
||
|
|
||
|
/* fdo.c */
|
||
|
|
||
|
NTSTATUS
|
||
|
NTAPI
|
||
|
PortFdoPnp(
|
||
|
_In_ PDEVICE_OBJECT DeviceObject,
|
||
|
_In_ PIRP Irp);
|
||
|
|
||
|
|
||
|
/* misc.c */
|
||
|
|
||
|
NTSTATUS
|
||
|
ForwardIrpAndWait(
|
||
|
_In_ PDEVICE_OBJECT LowerDevice,
|
||
|
_In_ PIRP Irp);
|
||
|
|
||
|
NTSTATUS
|
||
|
NTAPI
|
||
|
ForwardIrpAndForget(
|
||
|
_In_ PDEVICE_OBJECT LowerDevice,
|
||
|
_In_ PIRP Irp);
|
||
|
|
||
|
|
||
|
/* pdo.c */
|
||
|
|
||
|
NTSTATUS
|
||
|
NTAPI
|
||
|
PortPdoPnp(
|
||
|
_In_ PDEVICE_OBJECT DeviceObject,
|
||
|
_In_ PIRP Irp);
|
||
|
|
||
|
|
||
|
/* storport.c */
|
||
|
|
||
|
NTSTATUS
|
||
|
NTAPI
|
||
|
DriverEntry(
|
||
|
_In_ PDRIVER_OBJECT DriverObject,
|
||
|
_In_ PUNICODE_STRING RegistryPath);
|
||
|
|
||
|
#endif /* _STORPORT_PCH_ */
|