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.

237 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. extern.h
  5. Abstract:
  6. External definitions for intermodule functions.
  7. Revision History:
  8. --*/
  9. #ifndef _SDBUS_EXTERN_H_
  10. #define _SDBUS_EXTERN_H_
  11. //
  12. // Global data referenced by the driver
  13. //
  14. extern ULONG SdbusGlobalFlags;
  15. extern ULONG SdbusDebugMask;
  16. extern PDEVICE_OBJECT FdoList;
  17. extern GLOBAL_REGISTRY_INFORMATION GlobalRegistryInfo[];
  18. extern ULONG GlobalInfoCount;
  19. extern const PCI_CONTROLLER_INFORMATION PciControllerInformation[];
  20. extern const PCI_VENDOR_INFORMATION PciVendorInformation[];
  21. extern KEVENT SdbusDelayTimerEvent;
  22. extern KSPIN_LOCK SdbusGlobalLock;
  23. extern ULONG EventDpcDelay;
  24. extern ULONG SdbusPowerPolicy;
  25. extern const UCHAR SdbusCmdResponse[];
  26. extern const UCHAR SdbusACmdResponse[];
  27. extern SD_FUNCTION_BLOCK ToshibaSupportFns;
  28. //
  29. // Irp dispatch routines
  30. //
  31. VOID
  32. SdbusInitDeviceDispatchTable(
  33. IN PDRIVER_OBJECT DriverObject
  34. );
  35. NTSTATUS
  36. SdbusFdoPnpDispatch(
  37. IN PDEVICE_OBJECT Fdo,
  38. IN PIRP Irp
  39. );
  40. NTSTATUS
  41. SdbusPdoPnpDispatch(
  42. IN PDEVICE_OBJECT Pdo,
  43. IN PIRP Irp
  44. );
  45. NTSTATUS
  46. SdbusOpenCloseDispatch(
  47. IN PDEVICE_OBJECT DeviceObject,
  48. IN PIRP Irp
  49. );
  50. NTSTATUS
  51. SdbusCleanupDispatch(
  52. IN PDEVICE_OBJECT DeviceObject,
  53. IN PIRP Irp
  54. );
  55. NTSTATUS
  56. SdbusFdoDeviceControl(
  57. IN PDEVICE_OBJECT DeviceObject,
  58. IN PIRP Irp
  59. );
  60. NTSTATUS
  61. SdbusPdoDeviceControl(
  62. IN PDEVICE_OBJECT DeviceObject,
  63. IN PIRP Irp
  64. );
  65. NTSTATUS
  66. SdbusPdoInternalDeviceControl(
  67. IN PDEVICE_OBJECT DeviceObject,
  68. IN PIRP Irp
  69. );
  70. NTSTATUS
  71. SdbusFdoSystemControl(
  72. IN PDEVICE_OBJECT DeviceObject,
  73. IN PIRP Irp
  74. );
  75. NTSTATUS
  76. SdbusPdoSystemControl(
  77. IN PDEVICE_OBJECT DeviceObject,
  78. IN PIRP Irp
  79. );
  80. //
  81. // enumeration routines
  82. //
  83. NTSTATUS
  84. SdbusEnumerateDevices(
  85. IN PDEVICE_OBJECT Fdo,
  86. IN PIRP Irp
  87. );
  88. NTSTATUS
  89. SdbusGetCardConfigData(
  90. IN PFDO_EXTENSION FdoExtension,
  91. OUT PSD_CARD_DATA *pCardData
  92. );
  93. VOID
  94. SdbusCleanupCardData(
  95. IN PSD_CARD_DATA CardData
  96. );
  97. UCHAR
  98. SdbusReadCIAChar(
  99. IN PFDO_EXTENSION FdoExtension,
  100. IN ULONG ciaPtr
  101. );
  102. VOID
  103. SdbusWriteCIAChar(
  104. IN PFDO_EXTENSION FdoExtension,
  105. IN ULONG ciaPtr,
  106. IN UCHAR data
  107. );
  108. //
  109. // controller support routines
  110. //
  111. NTSTATUS
  112. SdbusAddDevice(
  113. IN PDRIVER_OBJECT DriverObject,
  114. IN PDEVICE_OBJECT pdo
  115. );
  116. VOID
  117. SdbusCleanupPdo(
  118. IN PDEVICE_OBJECT Pdo
  119. );
  120. VOID
  121. SdbusActivateSocket(
  122. IN PDEVICE_OBJECT Fdo,
  123. IN PSDBUS_ACTIVATE_COMPLETION_ROUTINE CompletionRoutine,
  124. IN PVOID Context
  125. );
  126. //
  127. // Interface routines
  128. //
  129. NTSTATUS
  130. SdbusPdoQueryInterface(
  131. IN PDEVICE_OBJECT Pdo,
  132. IN OUT PIRP Irp
  133. );
  134. NTSTATUS
  135. SdbusGetInterface(
  136. IN PDEVICE_OBJECT Pdo,
  137. IN CONST GUID *pGuid,
  138. IN USHORT sizeofInterface,
  139. OUT PINTERFACE pInterface
  140. );
  141. NTSTATUS
  142. SdbusGetSetPciConfigData(
  143. IN PDEVICE_OBJECT PciPdo,
  144. IN PVOID Buffer,
  145. IN ULONG Offset,
  146. IN ULONG Length,
  147. IN BOOLEAN Read
  148. );
  149. //
  150. // Interrupt routines
  151. //
  152. BOOLEAN
  153. SdbusInterrupt(
  154. IN PKINTERRUPT InterruptObject,
  155. IN PVOID Context
  156. );
  157. VOID
  158. SdbusInterruptDpc(
  159. IN PKDPC Dpc,
  160. IN PDEVICE_OBJECT DeviceObject,
  161. IN PVOID SystemContext1,
  162. IN PVOID SystemContext2
  163. );
  164. VOID
  165. SdbusDpc(
  166. IN PKDPC Dpc,
  167. IN PDEVICE_OBJECT DeviceObject,
  168. IN PVOID SystemContext1,
  169. IN PVOID SystemContext2
  170. );
  171. VOID
  172. SdbusEventWorkItemProc(
  173. IN PDEVICE_OBJECT Fdo,
  174. IN PVOID Context
  175. );
  176. //
  177. // Registry routines
  178. //
  179. NTSTATUS
  180. SdbusLoadGlobalRegistryValues(
  181. VOID
  182. );
  183. NTSTATUS
  184. SdbusGetControllerRegistrySettings(
  185. IN OUT PFDO_EXTENSION FdoExtension
  186. );
  187. #endif // _SDBUS_EXTERN_H_