disk, diskdump, pciidex, scsiport.
[reactos.git] / reactos / drivers / storage / pciidex / pciidex.h
1 #include <ntifs.h>
2 #include <ntddk.h>
3 #include <ide.h>
4 #include <wdmguid.h>
5 #include <stdio.h>
6
7 /* FIXME: I don't know why it is not defined anywhere... */
8 NTSTATUS STDCALL
9 IoAttachDeviceToDeviceStackSafe(
10 IN PDEVICE_OBJECT SourceDevice,
11 IN PDEVICE_OBJECT TargetDevice,
12 OUT PDEVICE_OBJECT *AttachedToDeviceObject);
13
14 typedef struct _PCIIDEX_DRIVER_EXTENSION
15 {
16 PCONTROLLER_PROPERTIES HwGetControllerProperties;
17 ULONG MiniControllerExtensionSize;
18 PCIIDE_UDMA_MODES_SUPPORTED HwUdmaModesSupported;
19 } PCIIDEX_DRIVER_EXTENSION, *PPCIIDEX_DRIVER_EXTENSION;
20
21 typedef struct _COMMON_DEVICE_EXTENSION
22 {
23 BOOLEAN IsFDO;
24 } COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION;
25
26 typedef struct _FDO_DEVICE_EXTENSION
27 {
28 COMMON_DEVICE_EXTENSION Common;
29
30 PBUS_INTERFACE_STANDARD BusInterface;
31 IDE_CONTROLLER_PROPERTIES Properties;
32 PHYSICAL_ADDRESS BusMasterPortBase;
33 PDEVICE_OBJECT LowerDevice;
34 PDEVICE_OBJECT Pdo[MAX_IDE_CHANNEL];
35 USHORT VendorId;
36 USHORT DeviceId;
37 PUCHAR MiniControllerExtension[0];
38 } FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION;
39
40 typedef struct _PDO_DEVICE_EXTENSION
41 {
42 COMMON_DEVICE_EXTENSION Common;
43
44 ULONG Channel;
45 PDEVICE_OBJECT ControllerFdo;
46 } PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION;
47
48 /* fdo.c */
49
50 NTSTATUS NTAPI
51 PciIdeXAddDevice(
52 IN PDRIVER_OBJECT DriverObject,
53 IN PDEVICE_OBJECT Pdo);
54
55 NTSTATUS NTAPI
56 PciIdeXFdoPnpDispatch(
57 IN PDEVICE_OBJECT DeviceObject,
58 IN PIRP Irp);
59
60 /* misc.c */
61
62 NTSTATUS NTAPI
63 PciIdeXGenericCompletion(
64 IN PDEVICE_OBJECT DeviceObject,
65 IN PIRP Irp,
66 IN PVOID Context);
67
68 NTSTATUS
69 ForwardIrpAndWait(
70 IN PDEVICE_OBJECT DeviceObject,
71 IN PIRP Irp);
72
73 NTSTATUS NTAPI
74 ForwardIrpAndForget(
75 IN PDEVICE_OBJECT DeviceObject,
76 IN PIRP Irp);
77
78 /* pdo.c */
79
80 NTSTATUS NTAPI
81 PciIdeXPdoPnpDispatch(
82 IN PDEVICE_OBJECT DeviceObject,
83 IN PIRP Irp);