bfi_pport.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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_fcport_h2i {
  23. BFI_FCPORT_H2I_ENABLE_REQ = (1),
  24. BFI_FCPORT_H2I_DISABLE_REQ = (2),
  25. BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ = (3),
  26. BFI_FCPORT_H2I_STATS_GET_REQ = (4),
  27. BFI_FCPORT_H2I_STATS_CLEAR_REQ = (5),
  28. };
  29. enum bfi_fcport_i2h {
  30. BFI_FCPORT_I2H_ENABLE_RSP = BFA_I2HM(1),
  31. BFI_FCPORT_I2H_DISABLE_RSP = BFA_I2HM(2),
  32. BFI_FCPORT_I2H_SET_SVC_PARAMS_RSP = BFA_I2HM(3),
  33. BFI_FCPORT_I2H_STATS_GET_RSP = BFA_I2HM(4),
  34. BFI_FCPORT_I2H_STATS_CLEAR_RSP = BFA_I2HM(5),
  35. BFI_FCPORT_I2H_EVENT = BFA_I2HM(6),
  36. };
  37. /**
  38. * Generic REQ type
  39. */
  40. struct bfi_fcport_req_s {
  41. struct bfi_mhdr_s mh; /* msg header */
  42. u32 msgtag; /* msgtag for reply */
  43. };
  44. /**
  45. * Generic RSP type
  46. */
  47. struct bfi_fcport_rsp_s {
  48. struct bfi_mhdr_s mh; /* common msg header */
  49. u8 status; /* port enable status */
  50. u8 rsvd[3];
  51. u32 msgtag; /* msgtag for reply */
  52. };
  53. /**
  54. * BFI_FCPORT_H2I_ENABLE_REQ
  55. */
  56. struct bfi_fcport_enable_req_s {
  57. struct bfi_mhdr_s mh; /* msg header */
  58. u32 rsvd1;
  59. wwn_t nwwn; /* node wwn of physical port */
  60. wwn_t pwwn; /* port wwn of physical port */
  61. struct bfa_pport_cfg_s port_cfg; /* port configuration */
  62. union bfi_addr_u stats_dma_addr; /* DMA address for stats */
  63. u32 msgtag; /* msgtag for reply */
  64. u32 rsvd2;
  65. };
  66. /**
  67. * BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ
  68. */
  69. struct bfi_fcport_set_svc_params_req_s {
  70. struct bfi_mhdr_s mh; /* msg header */
  71. u16 tx_bbcredit; /* Tx credits */
  72. u16 rsvd;
  73. };
  74. /**
  75. * BFI_FCPORT_I2H_EVENT
  76. */
  77. struct bfi_fcport_event_s {
  78. struct bfi_mhdr_s mh; /* common msg header */
  79. struct bfa_pport_link_s link_state;
  80. };
  81. /**
  82. * fcport H2I message
  83. */
  84. union bfi_fcport_h2i_msg_u {
  85. struct bfi_mhdr_s *mhdr;
  86. struct bfi_fcport_enable_req_s *penable;
  87. struct bfi_fcport_req_s *pdisable;
  88. struct bfi_fcport_set_svc_params_req_s *psetsvcparams;
  89. struct bfi_fcport_req_s *pstatsget;
  90. struct bfi_fcport_req_s *pstatsclear;
  91. };
  92. /**
  93. * fcport I2H message
  94. */
  95. union bfi_fcport_i2h_msg_u {
  96. struct bfi_msg_s *msg;
  97. struct bfi_fcport_rsp_s *penable_rsp;
  98. struct bfi_fcport_rsp_s *pdisable_rsp;
  99. struct bfi_fcport_rsp_s *psetsvcparams_rsp;
  100. struct bfi_fcport_rsp_s *pstatsget_rsp;
  101. struct bfi_fcport_rsp_s *pstatsclear_rsp;
  102. struct bfi_fcport_event_s *event;
  103. };
  104. #pragma pack()
  105. #endif /* __BFI_PPORT_H__ */