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.

198 lines
3.1 KiB

  1. //
  2. // Copyright (c) 1998-1999, Microsoft Corporation, all rights reserved
  3. //
  4. // mp.h
  5. //
  6. // IEEE1394 mini-port/call-manager driver
  7. //
  8. // Broadcast Channel Manager - header file
  9. //
  10. // 07/05/99 ADube - Created - Declaration for miniport routines
  11. //
  12. //
  13. // Various timeout used throught the BCM algorithm
  14. //
  15. #define ONE_SEC 1000000
  16. #define ONE_MINUTE 60000
  17. #define FIFTY_MILLISECONDS 50000
  18. #define BCM_NUM_RETRY 5
  19. #define BCM_GENERIC_TIMEOUT 50000 // 50msec
  20. #define BCM_WAIT_FOR_EVENT_TIME 60000000 // 60sec
  21. //
  22. // BCR Register flags in the BigEndian and little Endian format
  23. //
  24. #define BCR_IMPLEMENTED_BIG_ENDIAN 0x00000080
  25. #define BCR_IMPLEMENTED_LITTLE_ENDIAN 0x80000000
  26. #define BCR_VALID_BIG_ENDIAN 0x000000C0
  27. #define BCR_VALID_LITTLE_ENDIAN 0xC0000000
  28. typedef struct _BCM_CONTEXT
  29. {
  30. ULONG Generation;
  31. PADAPTERCB pAdapter;
  32. }BCM_CONTEXT, *PBCM_CONTEXT;
  33. //
  34. // Broadcast Channel Manager functions begin here
  35. //
  36. VOID
  37. nicBCRAccessedCallback (
  38. IN PNOTIFICATION_INFO pNotificationInfo
  39. );
  40. VOID
  41. nicBCMAbort (
  42. IN PADAPTERCB pAdapter,
  43. IN PREMOTE_NODE pRemoteNode
  44. );
  45. VOID
  46. nicBCMAddRemoteNode (
  47. IN PADAPTERCB pAdapter,
  48. IN BOOLEAN fIsOnlyRemoteNode
  49. );
  50. VOID
  51. nicBCMAlgorithm(
  52. PADAPTERCB pAdapter,
  53. ULONG BcmGeneration
  54. );
  55. VOID
  56. nicBCMAlgorithmWorkItem(
  57. PNDIS_WORK_ITEM pWorkItem,
  58. PVOID Context
  59. );
  60. VOID
  61. nicBCMCheckLastNodeRemoved(
  62. IN PADAPTERCB pAdapter
  63. );
  64. NDIS_STATUS
  65. nicFindIrmAmongRemoteNodes (
  66. IN PADAPTERCB pAdapter,
  67. IN ULONG BCMGeneration,
  68. OUT PPREMOTE_NODE ppIrmRemoteNode
  69. );
  70. VOID
  71. nicFreeBroadcastChannelRegister(
  72. IN PADAPTERCB pAdapter
  73. );
  74. NDIS_STATUS
  75. nicInformAllRemoteNodesOfBCM (
  76. IN PADAPTERCB pAdapter
  77. );
  78. NDIS_STATUS
  79. nicInitializeBroadcastChannelRegister (
  80. PADAPTERCB pAdapter
  81. );
  82. NDIS_STATUS
  83. nicIsLocalHostTheIrm(
  84. IN PADAPTERCB pAdapter,
  85. OUT PBOOLEAN pfIsLocalHostIrm,
  86. OUT PPTOPOLOGY_MAP ppTopologyMap,
  87. OUT PNODE_ADDRESS pLocalHostAddress
  88. );
  89. NDIS_STATUS
  90. nicLocalHostIsIrm(
  91. IN PADAPTERCB pAdapter
  92. );
  93. NDIS_STATUS
  94. nicLocalHostIsNotIrm (
  95. IN PADAPTERCB pAdapter,
  96. IN ULONG CurrentGeneration
  97. );
  98. NDIS_STATUS
  99. nicLocalNotIrmMandatoryWait (
  100. IN PADAPTERCB pAdapter,
  101. IN ULONG BCMGeneration,
  102. OUT NETWORK_CHANNELSR* pBCR
  103. );
  104. NDIS_STATUS
  105. nicReadIrmBcr (
  106. PREMOTE_NODE pIrmRemoteNode,
  107. IN PMDL pBCRMdl,
  108. IN ULONG GivenGeneration,
  109. OUT PBOOLEAN fDidTheBusReset
  110. );
  111. NDIS_STATUS
  112. nicRetryToReadIrmBcr(
  113. PREMOTE_NODE pIrmRemoteNode,
  114. PMDL pRemoteBCRMdl,
  115. ULONG Generation,
  116. PBOOLEAN pfDidTheBusReset
  117. );
  118. NDIS_STATUS
  119. nicScheduleBCMWorkItem(
  120. PADAPTERCB pAdapter
  121. );
  122. VOID
  123. nicSetEventMakeCall (
  124. IN PADAPTERCB pAdapter
  125. );
  126. VOID
  127. nicLocalHostIsNotIrmPost (
  128. PADAPTERCB pAdapter,
  129. PREMOTE_NODE pIrmRemoteNode,
  130. BOOLEAN fNeedToReset,
  131. BOOLEAN fRemoteNodeBCRIsValid ,
  132. BOOLEAN fLocalHostBCRIsValid ,
  133. BOOLEAN fDidTheBusReset,
  134. NETWORK_CHANNELSR* pBCR
  135. );