Source code of Windows XP (NT5)
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.

381 lines
8.1 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, adapted from the l2tp sources.
  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. nicAsyncStream (
  35. PREMOTE_NODE pRemoteNodePdoCb,
  36. ULONG nNumberOfBytesToStream, // Bytes to stream
  37. ULONG fulFlags, // Flags pertinent to stream
  38. PMDL pMdl, // Source buffer
  39. ULONG ulTag, // Tag
  40. ULONG nChannel, // Channel
  41. ULONG ulSynch, // Sy
  42. ULONG Reserved, // Reserved for future use
  43. UCHAR nSpeed
  44. );
  45. NDIS_STATUS
  46. nicAsyncRead_Synch(
  47. PREMOTE_NODE pRemoteNode,
  48. IO_ADDRESS DestinationAddress,
  49. ULONG nNumberOfBytesToRead,
  50. ULONG nBlockSize,
  51. ULONG fulFlags,
  52. PMDL Mdl,
  53. ULONG ulGeneration,
  54. OUT NTSTATUS *pNtStatus
  55. );
  56. NDIS_STATUS
  57. nicAsyncWrite_Synch(
  58. PREMOTE_NODE pRemoteNode,
  59. IO_ADDRESS DestinationAddress, // Address to write to
  60. ULONG nNumberOfBytesToWrite, // Bytes to write
  61. ULONG nBlockSize, // Block size of write
  62. ULONG fulFlags, // Flags pertinent to write
  63. PMDL Mdl, // Destination buffer
  64. ULONG ulGeneration, // Generation as known by driver
  65. OUT NTSTATUS *pNtStatus // pointer to NTSTatus returned by the IRP
  66. );
  67. NDIS_STATUS
  68. nicFreeAddressRange(
  69. IN PADAPTERCB pAdapter,
  70. IN ULONG nAddressesToFree,
  71. IN PADDRESS_RANGE p1394AddressRange,
  72. IN PHANDLE phAddressRange
  73. );
  74. NDIS_STATUS
  75. nicBusReset (
  76. IN PADAPTERCB pAdapter,
  77. IN OUT ULONG fulFlags
  78. );
  79. NDIS_STATUS
  80. nicBusResetNotification (
  81. IN PADAPTERCB pAdapter,
  82. IN ULONG fulFlags,
  83. IN PBUS_BUS_RESET_NOTIFICATION pResetRoutine,
  84. IN PVOID pResetContext
  85. );
  86. NDIS_STATUS
  87. nicFreeChannel(
  88. IN PADAPTERCB pAdapter,
  89. IN ULONG nChannel
  90. );
  91. NDIS_STATUS
  92. nicGet1394AddressFromDeviceObject(
  93. IN PDEVICE_OBJECT pPdo,
  94. IN OUT NODE_ADDRESS *pNodeAddress,
  95. IN ULONG fulFlags
  96. );
  97. NDIS_STATUS
  98. nicGet1394AddressOfRemoteNode(
  99. IN PREMOTE_NODE pRemoteNode,
  100. IN OUT NODE_ADDRESS *pNodeAddress,
  101. IN ULONG fulFlags
  102. );
  103. NDIS_STATUS
  104. nicGetGenerationCount(
  105. IN PADAPTERCB pAdapter,
  106. IN OUT PULONG GenerationCount
  107. );
  108. NDIS_STATUS
  109. nicIsochAllocateBandwidth(
  110. IN PREMOTE_NODE pRemoteNodePdoCb,
  111. IN ULONG MaxBytesPerFrameRequested,
  112. IN ULONG SpeedRequested,
  113. OUT PHANDLE phBandwidth,
  114. OUT PULONG pBytesPerFrameAvailable,
  115. OUT PULONG pSpeedSelected
  116. );
  117. NDIS_STATUS
  118. nicAllocateChannel (
  119. IN PADAPTERCB pAdapter,
  120. IN ULONG pChannel,
  121. OUT PULARGE_INTEGER pChannelsAvailable OPTIONAL
  122. );
  123. NDIS_STATUS
  124. nicQueryChannelMap (
  125. IN PADAPTERCB pAdapter,
  126. OUT PULARGE_INTEGER pChannelsAvailable
  127. );
  128. NDIS_STATUS
  129. nicIsochAllocateResources (
  130. IN PADAPTERCB pAdapter,
  131. IN ULONG fulSpeed,
  132. IN ULONG fulFlags,
  133. IN ULONG nChannel,
  134. IN ULONG nMaxBytesPerFrame,
  135. IN ULONG nNumberOfBuffers,
  136. IN ULONG nMaxBufferSize,
  137. IN ULONG nQuadletsToStrip,
  138. IN ULARGE_INTEGER uliChannelMask,
  139. IN OUT PHANDLE hResource
  140. );
  141. NDIS_STATUS
  142. nicIsochAttachBuffers (
  143. IN PADAPTERCB pAdapter,
  144. HANDLE hResource,
  145. ULONG nNumberOfDescriptors,
  146. PISOCH_DESCRIPTOR pIsochDescriptor
  147. );
  148. NDIS_STATUS
  149. nicIsochFreeResources(
  150. IN PADAPTERCB pAdapter,
  151. IN HANDLE hResource
  152. );
  153. NDIS_STATUS
  154. nicIsochFreeBandwidth(
  155. IN REMOTE_NODE *pRemoteNode,
  156. IN HANDLE hBandwidth
  157. );
  158. NDIS_STATUS
  159. nicIsochListen (
  160. IN PADAPTERCB pAdapter,
  161. HANDLE hResource,
  162. ULONG fulFlags,
  163. CYCLE_TIME StartTime
  164. );
  165. NDIS_STATUS
  166. nicGetMaxSpeedBetweenDevices (
  167. PADAPTERCB pAdapter,
  168. UINT NumOfRemoteNodes,
  169. PDEVICE_OBJECT pArrayDestinationPDO[64],
  170. PULONG pSpeed
  171. );
  172. NDIS_STATUS
  173. nicIsochDetachBuffers (
  174. IN PADAPTERCB pAdapter,
  175. IN HANDLE hResource,
  176. IN ULONG nNumberOfDescriptors,
  177. PISOCH_DESCRIPTOR pIsochDescriptor
  178. );
  179. NDIS_STATUS
  180. nicIsochStop (
  181. IN PADAPTERCB pAdapter,
  182. IN HANDLE hResource
  183. );
  184. NDIS_STATUS
  185. nicIsochModifyStreamProperties (
  186. PADAPTERCB pAdapter,
  187. NDIS_HANDLE hResource,
  188. ULARGE_INTEGER ullChannelMap,
  189. ULONG ulSpeed);
  190. NDIS_STATUS
  191. nicGetLocalHostCSRTopologyMap(
  192. IN PADAPTERCB pAdapter,
  193. IN PULONG pLength,
  194. IN PVOID pBuffer
  195. );
  196. NDIS_STATUS
  197. nicAsyncLock(
  198. PREMOTE_NODE pRemoteNode,
  199. IO_ADDRESS DestinationAddress, // Address to lock to
  200. ULONG nNumberOfArgBytes, // Bytes in Arguments
  201. ULONG nNumberOfDataBytes, // Bytes in DataValues
  202. ULONG fulTransactionType, // Lock transaction type
  203. ULONG Arguments[2], // Arguments used in Lock
  204. ULONG DataValues[2], // Data values
  205. PVOID pBuffer, // Destination buffer (virtual address)
  206. ULONG ulGeneration // Generation as known by driver
  207. );
  208. NDIS_STATUS
  209. nicSetLocalHostPropertiesCRom (
  210. IN PADAPTERCB pAdapter,
  211. IN PUCHAR pConfigRom,
  212. IN ULONG Length,
  213. IN ULONG Flags,
  214. IN OUT PHANDLE phCromData,
  215. IN OUT PMDL *ppConfigRomMdl
  216. );
  217. NDIS_STATUS
  218. nicGetLocalHostUniqueId(
  219. IN PADAPTERCB pAdapter,
  220. IN OUT PGET_LOCAL_HOST_INFO1 pUid
  221. );
  222. NDIS_STATUS
  223. nicGetConfigRom(
  224. IN PDEVICE_OBJECT pPdo,
  225. OUT PVOID *ppCrom
  226. );
  227. NDIS_STATUS
  228. nicGetLocalHostConfigRom(
  229. IN PADAPTERCB pAdapter,
  230. OUT PVOID *ppCRom
  231. );
  232. NDIS_STATUS
  233. nicGetReadWriteCapLocalHost(
  234. IN PADAPTERCB pAdapter,
  235. PGET_LOCAL_HOST_INFO2 pReadWriteCaps
  236. );
  237. NTSTATUS
  238. nicSubmitIrp(
  239. IN PDEVICE_OBJECT pPDO,
  240. IN PIRP pIrp,
  241. IN PIRB pIrb,
  242. IN PIO_COMPLETION_ROUTINE pCompletion,
  243. IN PVOID pContext
  244. );
  245. NDIS_STATUS
  246. nicSubmitIrp_Synch(
  247. IN REMOTE_NODE *pRemoteNode,
  248. IN PIRP pIrp,
  249. IN PIRB pIrb
  250. );
  251. NTSTATUS
  252. nicSubmitIrp_SynchComplete(
  253. IN PDEVICE_OBJECT DeviceObject,
  254. IN PIRP pIrp,
  255. IN PVOID Context
  256. );
  257. NDIS_STATUS
  258. nicSubmitIrp_LocalHostSynch(
  259. IN PADAPTERCB pAdapter,
  260. IN PIRP pIrp,
  261. IN PIRB pIrb
  262. );
  263. //-----------------------------------------------------------------------------
  264. // Local prototypes (alphabetically)
  265. //-----------------------------------------------------------------------------
  266. VOID
  267. nicAsyncStreamDebugSpew (
  268. PIRB pIrb
  269. );
  270. VOID
  271. nicFreeAddressRangeDebugSpew(
  272. IN PIRB pIrb
  273. );
  274. VOID
  275. nicIsochAllocateResourcesDebugSpew(
  276. IN PIRB pIrb
  277. );
  278. NTSTATUS
  279. nicSubmitIrp_DummyComplete(
  280. IN PDEVICE_OBJECT DeviceObject,
  281. IN PIRP pIrp,
  282. IN PVOID Context
  283. );
  284. NDIS_STATUS
  285. nicSubmitIrp_PDOSynch(
  286. IN PDEVICE_OBJECT pPdo,
  287. IN PIRP pIrp,
  288. IN PIRB pIrb
  289. );