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.

362 lines
7.8 KiB

  1. //
  2. // Copyright (c) 1998-1999, Microsoft Corporation, all rights reserved
  3. //
  4. // irp.h
  5. //
  6. // IEEE1394 mini-port/call-manager driver
  7. //
  8. // Delaration for Routines that issue the Irps to the 1394 Bus driver
  9. //
  10. // 06/20/1999 ADube Created
  11. //
  12. //----------------------------------------------------------------------------
  13. // 1 3 9 4 B U S I N T E R F A C E F U N C T I O N S
  14. //----------------------------------------------------------------------------
  15. NDIS_STATUS
  16. nicAllocateAddressRange_Synch (
  17. IN PADAPTERCB pAdapter,
  18. IN PMDL pMdl,
  19. IN ULONG fulFlags,
  20. IN ULONG nLength,
  21. IN ULONG MaxSegmentSize,
  22. IN ULONG fulAccessType,
  23. IN ULONG fulNotificationOptions,
  24. IN PVOID Callback,
  25. IN PVOID Context,
  26. IN ADDRESS_OFFSET Required1394Offset,
  27. IN PSLIST_HEADER FifoSListHead,
  28. IN PKSPIN_LOCK FifoSpinLock,
  29. OUT PULONG pAddressesReturned,
  30. OUT PADDRESS_RANGE p1394AddressRange,
  31. OUT PHANDLE phAddressRange
  32. );
  33. NDIS_STATUS
  34. nicAsyncRead_Synch(
  35. PREMOTE_NODE pRemoteNode,
  36. IO_ADDRESS DestinationAddress,
  37. ULONG nNumberOfBytesToRead,
  38. ULONG nBlockSize,
  39. ULONG fulFlags,
  40. PMDL Mdl,
  41. ULONG ulGeneration,
  42. OUT NTSTATUS *pNtStatus
  43. );
  44. NDIS_STATUS
  45. nicAsyncWrite_Synch(
  46. PREMOTE_NODE pRemoteNode,
  47. IO_ADDRESS DestinationAddress, // Address to write to
  48. ULONG nNumberOfBytesToWrite, // Bytes to write
  49. ULONG nBlockSize, // Block size of write
  50. ULONG fulFlags, // Flags pertinent to write
  51. PMDL Mdl, // Destination buffer
  52. ULONG ulGeneration, // Generation as known by driver
  53. OUT NTSTATUS *pNtStatus // pointer to NTSTatus returned by the IRP
  54. );
  55. NDIS_STATUS
  56. nicFreeAddressRange(
  57. IN PADAPTERCB pAdapter,
  58. IN ULONG nAddressesToFree,
  59. IN PADDRESS_RANGE p1394AddressRange,
  60. IN PHANDLE phAddressRange
  61. );
  62. NDIS_STATUS
  63. nicBusReset (
  64. IN PADAPTERCB pAdapter,
  65. IN OUT ULONG fulFlags
  66. );
  67. NDIS_STATUS
  68. nicBusResetNotification (
  69. IN PADAPTERCB pAdapter,
  70. IN ULONG fulFlags,
  71. IN PBUS_BUS_RESET_NOTIFICATION pResetRoutine,
  72. IN PVOID pResetContext
  73. );
  74. NDIS_STATUS
  75. nicFreeChannel(
  76. IN PADAPTERCB pAdapter,
  77. IN ULONG nChannel
  78. );
  79. NDIS_STATUS
  80. nicGet1394AddressFromDeviceObject(
  81. IN PDEVICE_OBJECT pPdo,
  82. IN OUT NODE_ADDRESS *pNodeAddress,
  83. IN ULONG fulFlags
  84. );
  85. NDIS_STATUS
  86. nicGet1394AddressOfRemoteNode(
  87. IN PREMOTE_NODE pRemoteNode,
  88. IN OUT NODE_ADDRESS *pNodeAddress,
  89. IN ULONG fulFlags
  90. );
  91. NDIS_STATUS
  92. nicGetGenerationCount(
  93. IN PADAPTERCB pAdapter,
  94. IN OUT PULONG GenerationCount
  95. );
  96. NDIS_STATUS
  97. nicIsochAllocateBandwidth(
  98. IN PREMOTE_NODE pRemoteNodePdoCb,
  99. IN ULONG MaxBytesPerFrameRequested,
  100. IN ULONG SpeedRequested,
  101. OUT PHANDLE phBandwidth,
  102. OUT PULONG pBytesPerFrameAvailable,
  103. OUT PULONG pSpeedSelected
  104. );
  105. NDIS_STATUS
  106. nicAllocateChannel (
  107. IN PADAPTERCB pAdapter,
  108. IN ULONG pChannel,
  109. OUT PULARGE_INTEGER pChannelsAvailable OPTIONAL
  110. );
  111. NDIS_STATUS
  112. nicQueryChannelMap (
  113. IN PADAPTERCB pAdapter,
  114. OUT PULARGE_INTEGER pChannelsAvailable
  115. );
  116. NDIS_STATUS
  117. nicIsochAllocateResources (
  118. IN PADAPTERCB pAdapter,
  119. IN ULONG fulSpeed,
  120. IN ULONG fulFlags,
  121. IN ULONG nChannel,
  122. IN ULONG nMaxBytesPerFrame,
  123. IN ULONG nNumberOfBuffers,
  124. IN ULONG nMaxBufferSize,
  125. IN ULONG nQuadletsToStrip,
  126. IN ULARGE_INTEGER uliChannelMask,
  127. IN OUT PHANDLE hResource
  128. );
  129. NDIS_STATUS
  130. nicIsochAttachBuffers (
  131. IN PADAPTERCB pAdapter,
  132. HANDLE hResource,
  133. ULONG nNumberOfDescriptors,
  134. PISOCH_DESCRIPTOR pIsochDescriptor
  135. );
  136. NDIS_STATUS
  137. nicIsochFreeResources(
  138. IN PADAPTERCB pAdapter,
  139. IN HANDLE hResource
  140. );
  141. NDIS_STATUS
  142. nicIsochFreeBandwidth(
  143. IN REMOTE_NODE *pRemoteNode,
  144. IN HANDLE hBandwidth
  145. );
  146. NDIS_STATUS
  147. nicIsochListen (
  148. IN PADAPTERCB pAdapter,
  149. HANDLE hResource,
  150. ULONG fulFlags,
  151. CYCLE_TIME StartTime
  152. );
  153. NDIS_STATUS
  154. nicGetMaxSpeedBetweenDevices (
  155. PADAPTERCB pAdapter,
  156. UINT NumOfRemoteNodes,
  157. PDEVICE_OBJECT pArrayDestinationPDO[64],
  158. PULONG pSpeed
  159. );
  160. NDIS_STATUS
  161. nicIsochDetachBuffers (
  162. IN PADAPTERCB pAdapter,
  163. IN HANDLE hResource,
  164. IN ULONG nNumberOfDescriptors,
  165. PISOCH_DESCRIPTOR pIsochDescriptor
  166. );
  167. NDIS_STATUS
  168. nicIsochStop (
  169. IN PADAPTERCB pAdapter,
  170. IN HANDLE hResource
  171. );
  172. NDIS_STATUS
  173. nicIsochModifyStreamProperties (
  174. PADAPTERCB pAdapter,
  175. NDIS_HANDLE hResource,
  176. ULARGE_INTEGER ullChannelMap,
  177. ULONG ulSpeed);
  178. NDIS_STATUS
  179. nicGetLocalHostCSRTopologyMap(
  180. IN PADAPTERCB pAdapter,
  181. IN PULONG pLength,
  182. IN PVOID pBuffer
  183. );
  184. NDIS_STATUS
  185. nicAsyncLock(
  186. PREMOTE_NODE pRemoteNode,
  187. IO_ADDRESS DestinationAddress, // Address to lock to
  188. ULONG nNumberOfArgBytes, // Bytes in Arguments
  189. ULONG nNumberOfDataBytes, // Bytes in DataValues
  190. ULONG fulTransactionType, // Lock transaction type
  191. ULONG Arguments[2], // Arguments used in Lock
  192. ULONG DataValues[2], // Data values
  193. PVOID pBuffer, // Destination buffer (virtual address)
  194. ULONG ulGeneration // Generation as known by driver
  195. );
  196. NDIS_STATUS
  197. nicSetLocalHostPropertiesCRom (
  198. IN PADAPTERCB pAdapter,
  199. IN PUCHAR pConfigRom,
  200. IN ULONG Length,
  201. IN ULONG Flags,
  202. IN OUT PHANDLE phCromData,
  203. IN OUT PMDL *ppConfigRomMdl
  204. );
  205. NDIS_STATUS
  206. nicGetLocalHostUniqueId(
  207. IN PADAPTERCB pAdapter,
  208. IN OUT PGET_LOCAL_HOST_INFO1 pUid
  209. );
  210. NDIS_STATUS
  211. nicGetConfigRom(
  212. IN PDEVICE_OBJECT pPdo,
  213. OUT PVOID *ppCrom
  214. );
  215. NDIS_STATUS
  216. nicGetLocalHostConfigRom(
  217. IN PADAPTERCB pAdapter,
  218. OUT PVOID *ppCRom
  219. );
  220. NDIS_STATUS
  221. nicGetReadWriteCapLocalHost(
  222. IN PADAPTERCB pAdapter,
  223. PGET_LOCAL_HOST_INFO2 pReadWriteCaps
  224. );
  225. NTSTATUS
  226. nicSubmitIrp(
  227. IN PDEVICE_OBJECT pPDO,
  228. IN PIRP pIrp,
  229. IN PIRB pIrb,
  230. IN PIO_COMPLETION_ROUTINE pCompletion,
  231. IN PVOID pContext
  232. );
  233. NDIS_STATUS
  234. nicSubmitIrp_Synch(
  235. IN REMOTE_NODE *pRemoteNode,
  236. IN PIRP pIrp,
  237. IN PIRB pIrb
  238. );
  239. NTSTATUS
  240. nicSubmitIrp_SynchComplete(
  241. IN PDEVICE_OBJECT DeviceObject,
  242. IN PIRP pIrp,
  243. IN PVOID Context
  244. );
  245. NDIS_STATUS
  246. nicSubmitIrp_LocalHostSynch(
  247. IN PADAPTERCB pAdapter,
  248. IN PIRP pIrp,
  249. IN PIRB pIrb
  250. );
  251. //-----------------------------------------------------------------------------
  252. // Local prototypes (alphabetically)
  253. //-----------------------------------------------------------------------------
  254. VOID
  255. nicFreeAddressRangeDebugSpew(
  256. IN PIRB pIrb
  257. );
  258. VOID
  259. nicIsochAllocateResourcesDebugSpew(
  260. IN PIRB pIrb
  261. );
  262. NTSTATUS
  263. nicSubmitIrp_DummyComplete(
  264. IN PDEVICE_OBJECT DeviceObject,
  265. IN PIRP pIrp,
  266. IN PVOID Context
  267. );
  268. NDIS_STATUS
  269. nicSubmitIrp_PDOSynch(
  270. IN PDEVICE_OBJECT pPdo,
  271. IN PIRP pIrp,
  272. IN PIRB pIrb
  273. );