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 IO_COMPLETION_ROUTINE PciIdeXGenericCompletion; 57 NTSTATUS NTAPI 58 PciIdeXGenericCompletion( 59 IN PDEVICE_OBJECT DeviceObject, 60 IN PIRP Irp, 61 IN PVOID Context); 62 63 NTSTATUS 64 ForwardIrpAndWait( 65 IN PDEVICE_OBJECT DeviceObject, 66 IN PIRP Irp); 67 68 NTSTATUS NTAPI 69 ForwardIrpAndForget( 70 IN PDEVICE_OBJECT DeviceObject, 71 IN PIRP Irp); 72 73 NTSTATUS 74 DuplicateUnicodeString( 75 IN ULONG Flags, 76 IN PCUNICODE_STRING SourceString, 77 OUT PUNICODE_STRING DestinationString); 78 79 /* pdo.c */ 80 81 NTSTATUS NTAPI 82 PciIdeXPdoPnpDispatch( 83 IN PDEVICE_OBJECT DeviceObject, 84 IN PIRP Irp); 85 86 #endif /* _PCIIDEX_PCH_ */ 87