Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
2.0 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1999 - 1999
  3. Module Name:
  4. init.c
  5. Abstract:
  6. Generic PCI IDE mini driver
  7. Revision History:
  8. --*/
  9. #if !defined (___pciide_h___)
  10. #define ___pciide_h___
  11. #include "ntddk.h"
  12. #include "ntdddisk.h"
  13. #include "ide.h"
  14. //
  15. // mini driver device extension
  16. //
  17. typedef struct _DEVICE_EXTENSION {
  18. //
  19. // pci config data cache
  20. //
  21. PCIIDE_CONFIG_HEADER pciConfigData;
  22. //
  23. // supported data transfer mode
  24. //
  25. ULONG SupportedTransferMode[MAX_IDE_CHANNEL][MAX_IDE_DEVICE];
  26. IDENTIFY_DATA IdentifyData[MAX_IDE_DEVICE];
  27. } DEVICE_EXTENSION, *PDEVICE_EXTENSION;
  28. #pragma pack(1)
  29. typedef struct _VENDOR_ID_DEVICE_ID {
  30. USHORT VendorId;
  31. USHORT DeviceId;
  32. } VENDOR_ID_DEVICE_ID, *PVENDOR_ID_DEVICE_ID;
  33. #pragma pack()
  34. //
  35. // mini driver entry point
  36. //
  37. NTSTATUS
  38. DriverEntry(
  39. IN PDRIVER_OBJECT DriverObject,
  40. IN PUNICODE_STRING RegistryPath
  41. );
  42. //
  43. // callback to query controller properties
  44. //
  45. NTSTATUS
  46. GenericIdeGetControllerProperties (
  47. IN PVOID DeviceExtension,
  48. IN PIDE_CONTROLLER_PROPERTIES ControllerProperties
  49. );
  50. //
  51. // to query whether a IDE channel is enabled
  52. //
  53. IDE_CHANNEL_STATE
  54. GenericIdeChannelEnabled (
  55. IN PDEVICE_EXTENSION DeviceExtension,
  56. IN ULONG Channel
  57. );
  58. //
  59. // to query whether both IDE channels requires
  60. // synchronized access
  61. //
  62. BOOLEAN
  63. GenericIdeSyncAccessRequired (
  64. IN PDEVICE_EXTENSION DeviceExtension
  65. );
  66. //
  67. // to query the supported UDMA modes. This routine
  68. // can be used to support newer UDMA modes
  69. //
  70. NTSTATUS
  71. GenericIdeUdmaModesSupported (
  72. IN IDENTIFY_DATA IdentifyData,
  73. IN OUT PULONG BestXferMode,
  74. IN OUT PULONG CurrentMode
  75. );
  76. #endif // ___pciide_h___