bfa_defs_itnim.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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 __BFA_DEFS_ITNIM_H__
  18. #define __BFA_DEFS_ITNIM_H__
  19. #include <bfa_os_inc.h>
  20. #include <protocol/types.h>
  21. /**
  22. * FCS itnim states
  23. */
  24. enum bfa_itnim_state {
  25. BFA_ITNIM_OFFLINE = 0, /* offline */
  26. BFA_ITNIM_PRLI_SEND = 1, /* prli send */
  27. BFA_ITNIM_PRLI_SENT = 2, /* prli sent */
  28. BFA_ITNIM_PRLI_RETRY = 3, /* prli retry */
  29. BFA_ITNIM_HCB_ONLINE = 4, /* online callback */
  30. BFA_ITNIM_ONLINE = 5, /* online */
  31. BFA_ITNIM_HCB_OFFLINE = 6, /* offline callback */
  32. BFA_ITNIM_INITIATIOR = 7, /* initiator */
  33. };
  34. struct bfa_itnim_hal_stats_s {
  35. u32 onlines; /* ITN nexus onlines (PRLI done) */
  36. u32 offlines; /* ITN Nexus offlines */
  37. u32 creates; /* ITN create requests */
  38. u32 deletes; /* ITN delete requests */
  39. u32 create_comps; /* ITN create completions */
  40. u32 delete_comps; /* ITN delete completions */
  41. u32 sler_events; /* SLER (sequence level error
  42. * recovery) events */
  43. u32 ioc_disabled; /* Num IOC disables */
  44. u32 cleanup_comps; /* ITN cleanup completions */
  45. u32 tm_cmnds; /* task management(TM) cmnds sent */
  46. u32 tm_fw_rsps; /* TM cmds firmware responses */
  47. u32 tm_success; /* TM successes */
  48. u32 tm_failures; /* TM failures */
  49. u32 tm_io_comps; /* TM IO completions */
  50. u32 tm_qresumes; /* TM queue resumes (after waiting
  51. * for resources)
  52. */
  53. u32 tm_iocdowns; /* TM cmnds affected by IOC down */
  54. u32 tm_cleanups; /* TM cleanups */
  55. u32 tm_cleanup_comps;
  56. /* TM cleanup completions */
  57. u32 ios; /* IO requests */
  58. u32 io_comps; /* IO completions */
  59. u64 input_reqs; /* INPUT requests */
  60. u64 output_reqs; /* OUTPUT requests */
  61. };
  62. /**
  63. * FCS remote port statistics
  64. */
  65. struct bfa_itnim_stats_s {
  66. u32 onlines; /* num rport online */
  67. u32 offlines; /* num rport offline */
  68. u32 prli_sent; /* num prli sent out */
  69. u32 fcxp_alloc_wait;/* num fcxp alloc waits */
  70. u32 prli_rsp_err; /* num prli rsp errors */
  71. u32 prli_rsp_acc; /* num prli rsp accepts */
  72. u32 initiator; /* rport is an initiator */
  73. u32 prli_rsp_parse_err; /* prli rsp parsing errors */
  74. u32 prli_rsp_rjt; /* num prli rsp rejects */
  75. u32 timeout; /* num timeouts detected */
  76. u32 sler; /* num sler notification from BFA */
  77. u32 rsvd;
  78. struct bfa_itnim_hal_stats_s hal_stats;
  79. };
  80. /**
  81. * FCS itnim attributes returned in queries
  82. */
  83. struct bfa_itnim_attr_s {
  84. enum bfa_itnim_state state; /* FCS itnim state */
  85. u8 retry; /* data retransmision support */
  86. u8 task_retry_id; /* task retry ident support */
  87. u8 rec_support; /* REC supported */
  88. u8 conf_comp; /* confirmed completion supp */
  89. };
  90. /**
  91. * BFA ITNIM events.
  92. * Arguments below are in BFAL context from Mgmt
  93. * BFA_ITNIM_AEN_NEW: [in]: None [out]: vf_id, lpwwn
  94. * BFA_ITNIM_AEN_DELETE: [in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets),
  95. * [out]: vf_id, ppwwn, lpwwn, rpwwn
  96. * BFA_ITNIM_AEN_ONLINE: [in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets),
  97. * [out]: vf_id, ppwwn, lpwwn, rpwwn
  98. * BFA_ITNIM_AEN_OFFLINE: [in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets),
  99. * [out]: vf_id, ppwwn, lpwwn, rpwwn
  100. * BFA_ITNIM_AEN_DISCONNECT:[in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets),
  101. * [out]: vf_id, ppwwn, lpwwn, rpwwn
  102. */
  103. enum bfa_itnim_aen_event {
  104. BFA_ITNIM_AEN_ONLINE = 1, /* Target online */
  105. BFA_ITNIM_AEN_OFFLINE = 2, /* Target offline */
  106. BFA_ITNIM_AEN_DISCONNECT = 3, /* Target disconnected */
  107. };
  108. /**
  109. * BFA ITNIM event data structure.
  110. */
  111. struct bfa_itnim_aen_data_s {
  112. u16 vf_id; /* vf_id of the IT nexus */
  113. u16 rsvd[3];
  114. wwn_t ppwwn; /* WWN of its physical port */
  115. wwn_t lpwwn; /* WWN of logical port */
  116. wwn_t rpwwn; /* WWN of remote(target) port */
  117. };
  118. #endif /* __BFA_DEFS_ITNIM_H__ */