bfi_pport.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /*
  2. * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
  3. * All rights reserved
  4. * www.brocade.com
  5. *
  6. * Linux driver for Brocade Fibre Channel Host Bus Adapter.
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License (GPL) Version 2 as
  10. * published by the Free Software Foundation
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. */
  17. #ifndef __BFI_PPORT_H__
  18. #define __BFI_PPORT_H__
  19. #include <bfi/bfi.h>
  20. #include <defs/bfa_defs_pport.h>
  21. #pragma pack(1)
  22. enum bfi_pport_h2i {
  23. BFI_PPORT_H2I_ENABLE_REQ = (1),
  24. BFI_PPORT_H2I_DISABLE_REQ = (2),
  25. BFI_PPORT_H2I_GET_STATS_REQ = (3),
  26. BFI_PPORT_H2I_CLEAR_STATS_REQ = (4),
  27. BFI_PPORT_H2I_SET_SVC_PARAMS_REQ = (5),
  28. BFI_PPORT_H2I_ENABLE_RX_VF_TAG_REQ = (6),
  29. BFI_PPORT_H2I_ENABLE_TX_VF_TAG_REQ = (7),
  30. BFI_PPORT_H2I_GET_QOS_STATS_REQ = (8),
  31. BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ = (9),
  32. };
  33. enum bfi_pport_i2h {
  34. BFI_PPORT_I2H_ENABLE_RSP = BFA_I2HM(1),
  35. BFI_PPORT_I2H_DISABLE_RSP = BFA_I2HM(2),
  36. BFI_PPORT_I2H_GET_STATS_RSP = BFA_I2HM(3),
  37. BFI_PPORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4),
  38. BFI_PPORT_I2H_SET_SVC_PARAMS_RSP = BFA_I2HM(5),
  39. BFI_PPORT_I2H_ENABLE_RX_VF_TAG_RSP = BFA_I2HM(6),
  40. BFI_PPORT_I2H_ENABLE_TX_VF_TAG_RSP = BFA_I2HM(7),
  41. BFI_PPORT_I2H_EVENT = BFA_I2HM(8),
  42. BFI_PPORT_I2H_GET_QOS_STATS_RSP = BFA_I2HM(9),
  43. BFI_PPORT_I2H_CLEAR_QOS_STATS_RSP = BFA_I2HM(10),
  44. };
  45. /**
  46. * Generic REQ type
  47. */
  48. struct bfi_pport_generic_req_s {
  49. struct bfi_mhdr_s mh; /* msg header */
  50. u32 msgtag; /* msgtag for reply */
  51. };
  52. /**
  53. * Generic RSP type
  54. */
  55. struct bfi_pport_generic_rsp_s {
  56. struct bfi_mhdr_s mh; /* common msg header */
  57. u8 status; /* port enable status */
  58. u8 rsvd[3];
  59. u32 msgtag; /* msgtag for reply */
  60. };
  61. /**
  62. * BFI_PPORT_H2I_ENABLE_REQ
  63. */
  64. struct bfi_pport_enable_req_s {
  65. struct bfi_mhdr_s mh; /* msg header */
  66. u32 rsvd1;
  67. wwn_t nwwn; /* node wwn of physical port */
  68. wwn_t pwwn; /* port wwn of physical port */
  69. struct bfa_pport_cfg_s port_cfg; /* port configuration */
  70. union bfi_addr_u stats_dma_addr; /* DMA address for stats */
  71. u32 msgtag; /* msgtag for reply */
  72. u32 rsvd2;
  73. };
  74. /**
  75. * BFI_PPORT_I2H_ENABLE_RSP
  76. */
  77. #define bfi_pport_enable_rsp_t struct bfi_pport_generic_rsp_s
  78. /**
  79. * BFI_PPORT_H2I_DISABLE_REQ
  80. */
  81. #define bfi_pport_disable_req_t struct bfi_pport_generic_req_s
  82. /**
  83. * BFI_PPORT_I2H_DISABLE_RSP
  84. */
  85. #define bfi_pport_disable_rsp_t struct bfi_pport_generic_rsp_s
  86. /**
  87. * BFI_PPORT_H2I_GET_STATS_REQ
  88. */
  89. #define bfi_pport_get_stats_req_t struct bfi_pport_generic_req_s
  90. /**
  91. * BFI_PPORT_I2H_GET_STATS_RSP
  92. */
  93. #define bfi_pport_get_stats_rsp_t struct bfi_pport_generic_rsp_s
  94. /**
  95. * BFI_PPORT_H2I_CLEAR_STATS_REQ
  96. */
  97. #define bfi_pport_clear_stats_req_t struct bfi_pport_generic_req_s
  98. /**
  99. * BFI_PPORT_I2H_CLEAR_STATS_RSP
  100. */
  101. #define bfi_pport_clear_stats_rsp_t struct bfi_pport_generic_rsp_s
  102. /**
  103. * BFI_PPORT_H2I_GET_QOS_STATS_REQ
  104. */
  105. #define bfi_pport_get_qos_stats_req_t struct bfi_pport_generic_req_s
  106. /**
  107. * BFI_PPORT_H2I_GET_QOS_STATS_RSP
  108. */
  109. #define bfi_pport_get_qos_stats_rsp_t struct bfi_pport_generic_rsp_s
  110. /**
  111. * BFI_PPORT_H2I_CLEAR_QOS_STATS_REQ
  112. */
  113. #define bfi_pport_clear_qos_stats_req_t struct bfi_pport_generic_req_s
  114. /**
  115. * BFI_PPORT_H2I_CLEAR_QOS_STATS_RSP
  116. */
  117. #define bfi_pport_clear_qos_stats_rsp_t struct bfi_pport_generic_rsp_s
  118. /**
  119. * BFI_PPORT_H2I_SET_SVC_PARAMS_REQ
  120. */
  121. struct bfi_pport_set_svc_params_req_s {
  122. struct bfi_mhdr_s mh; /* msg header */
  123. u16 tx_bbcredit; /* Tx credits */
  124. u16 rsvd;
  125. };
  126. /**
  127. * BFI_PPORT_I2H_SET_SVC_PARAMS_RSP
  128. */
  129. /**
  130. * BFI_PPORT_I2H_EVENT
  131. */
  132. struct bfi_pport_event_s {
  133. struct bfi_mhdr_s mh; /* common msg header */
  134. struct bfa_pport_link_s link_state;
  135. };
  136. union bfi_pport_h2i_msg_u {
  137. struct bfi_mhdr_s *mhdr;
  138. struct bfi_pport_enable_req_s *penable;
  139. struct bfi_pport_generic_req_s *pdisable;
  140. struct bfi_pport_generic_req_s *pgetstats;
  141. struct bfi_pport_generic_req_s *pclearstats;
  142. struct bfi_pport_set_svc_params_req_s *psetsvcparams;
  143. struct bfi_pport_get_qos_stats_req_s *pgetqosstats;
  144. struct bfi_pport_generic_req_s *pclearqosstats;
  145. };
  146. union bfi_pport_i2h_msg_u {
  147. struct bfi_msg_s *msg;
  148. struct bfi_pport_generic_rsp_s *enable_rsp;
  149. struct bfi_pport_disable_rsp_s *disable_rsp;
  150. struct bfi_pport_generic_rsp_s *getstats_rsp;
  151. struct bfi_pport_clear_stats_rsp_s *clearstats_rsp;
  152. struct bfi_pport_set_svc_params_rsp_s *setsvcparasm_rsp;
  153. struct bfi_pport_get_qos_stats_rsp_s *getqosstats_rsp;
  154. struct bfi_pport_clear_qos_stats_rsp_s *clearqosstats_rsp;
  155. struct bfi_pport_event_s *event;
  156. };
  157. #pragma pack()
  158. #endif /* __BFI_PPORT_H__ */