xref: /reactos/drivers/storage/ide/pciidex/pciidex.h (revision 7e22dc05)
1 #ifndef _PCIIDEX_PCH_
2 #define _PCIIDEX_PCH_
3 
4 #include <ntifs.h>
5 #include <ide.h>
6 
7 typedef struct _PCIIDEX_DRIVER_EXTENSION
8 {
9 	PCONTROLLER_PROPERTIES HwGetControllerProperties;
10 	ULONG MiniControllerExtensionSize;
11 	PCIIDE_UDMA_MODES_SUPPORTED HwUdmaModesSupported;
12 } PCIIDEX_DRIVER_EXTENSION, *PPCIIDEX_DRIVER_EXTENSION;
13 
14 typedef struct _COMMON_DEVICE_EXTENSION
15 {
16 	BOOLEAN IsFDO;
17 } COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION;
18 
19 typedef struct _FDO_DEVICE_EXTENSION
20 {
21 	COMMON_DEVICE_EXTENSION Common;
22 
23 	PBUS_INTERFACE_STANDARD BusInterface;
24 	IDE_CONTROLLER_PROPERTIES Properties;
25 	PHYSICAL_ADDRESS BusMasterPortBase;
26 	PDEVICE_OBJECT LowerDevice;
27 	PDEVICE_OBJECT Pdo[MAX_IDE_CHANNEL];
28 	USHORT VendorId;
29 	USHORT DeviceId;
30 	PUCHAR MiniControllerExtension[0];
31 } FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION;
32 
33 typedef struct _PDO_DEVICE_EXTENSION
34 {
35 	COMMON_DEVICE_EXTENSION Common;
36 
37 	ULONG Channel;
38 	PDEVICE_OBJECT ControllerFdo;
39 } PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION;
40 
41 /* fdo.c */
42 
43 DRIVER_ADD_DEVICE PciIdeXAddDevice;
44 NTSTATUS NTAPI
45 PciIdeXAddDevice(
46 	IN PDRIVER_OBJECT DriverObject,
47 	IN PDEVICE_OBJECT Pdo);
48 
49 NTSTATUS NTAPI
50 PciIdeXFdoPnpDispatch(
51 	IN PDEVICE_OBJECT DeviceObject,
52 	IN PIRP Irp);
53 
54 /* misc.c */
55 
56 NTSTATUS NTAPI
57 ForwardIrpAndForget(
58 	IN PDEVICE_OBJECT DeviceObject,
59 	IN PIRP Irp);
60 
61 NTSTATUS
62 DuplicateUnicodeString(
63 	IN ULONG Flags,
64 	IN PCUNICODE_STRING SourceString,
65 	OUT PUNICODE_STRING DestinationString);
66 
67 /* pdo.c */
68 
69 NTSTATUS NTAPI
70 PciIdeXPdoPnpDispatch(
71 	IN PDEVICE_OBJECT DeviceObject,
72 	IN PIRP Irp);
73 
74 #endif /* _PCIIDEX_PCH_ */
75