bfa_modules.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
  3. * Copyright (c) 2014- QLogic Corporation.
  4. * All rights reserved
  5. * www.qlogic.com
  6. *
  7. * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter.
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License (GPL) Version 2 as
  11. * published by the Free Software Foundation
  12. *
  13. * This program is distributed in the hope that it will be useful, but
  14. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. */
  18. /*
  19. * bfa_modules.h BFA modules
  20. */
  21. #ifndef __BFA_MODULES_H__
  22. #define __BFA_MODULES_H__
  23. #include "bfa_cs.h"
  24. #include "bfa.h"
  25. #include "bfa_svc.h"
  26. #include "bfa_fcpim.h"
  27. #include "bfa_port.h"
  28. struct bfa_modules_s {
  29. struct bfa_fcdiag_s fcdiag; /* fcdiag module */
  30. struct bfa_fcport_s fcport; /* fc port module */
  31. struct bfa_fcxp_mod_s fcxp_mod; /* fcxp module */
  32. struct bfa_lps_mod_s lps_mod; /* fcxp module */
  33. struct bfa_uf_mod_s uf_mod; /* unsolicited frame module */
  34. struct bfa_rport_mod_s rport_mod; /* remote port module */
  35. struct bfa_fcp_mod_s fcp_mod; /* FCP initiator module */
  36. struct bfa_sgpg_mod_s sgpg_mod; /* SG page module */
  37. struct bfa_port_s port; /* Physical port module */
  38. struct bfa_ablk_s ablk; /* ASIC block config module */
  39. struct bfa_cee_s cee; /* CEE Module */
  40. struct bfa_sfp_s sfp; /* SFP module */
  41. struct bfa_flash_s flash; /* flash module */
  42. struct bfa_diag_s diag_mod; /* diagnostics module */
  43. struct bfa_phy_s phy; /* phy module */
  44. struct bfa_dconf_mod_s dconf_mod; /* DCONF common module */
  45. struct bfa_fru_s fru; /* fru module */
  46. };
  47. /*
  48. * !!! Only append to the enums defined here to avoid any versioning
  49. * !!! needed between trace utility and driver version
  50. */
  51. enum {
  52. BFA_TRC_HAL_CORE = 1,
  53. BFA_TRC_HAL_FCXP = 2,
  54. BFA_TRC_HAL_FCPIM = 3,
  55. BFA_TRC_HAL_IOCFC_CT = 4,
  56. BFA_TRC_HAL_IOCFC_CB = 5,
  57. };
  58. #define BFA_CACHELINE_SZ (256)
  59. struct bfa_s {
  60. void *bfad; /* BFA driver instance */
  61. struct bfa_plog_s *plog; /* portlog buffer */
  62. struct bfa_trc_mod_s *trcmod; /* driver tracing */
  63. struct bfa_ioc_s ioc; /* IOC module */
  64. struct bfa_iocfc_s iocfc; /* IOCFC module */
  65. struct bfa_timer_mod_s timer_mod; /* timer module */
  66. struct bfa_modules_s modules; /* BFA modules */
  67. struct list_head comp_q; /* pending completions */
  68. bfa_boolean_t queue_process; /* queue processing enabled */
  69. struct list_head reqq_waitq[BFI_IOC_MAX_CQS];
  70. bfa_boolean_t fcs; /* FCS is attached to BFA */
  71. struct bfa_msix_s msix;
  72. int bfa_aen_seq;
  73. bfa_boolean_t intr_enabled; /* Status of interrupts */
  74. };
  75. extern bfa_boolean_t bfa_auto_recover;
  76. void bfa_dconf_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *);
  77. void bfa_dconf_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
  78. struct bfa_s *);
  79. void bfa_dconf_iocdisable(struct bfa_s *);
  80. void bfa_fcp_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
  81. struct bfa_pcidev_s *);
  82. void bfa_fcp_iocdisable(struct bfa_s *bfa);
  83. void bfa_fcp_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
  84. struct bfa_s *);
  85. void bfa_fcpim_iocdisable(struct bfa_fcp_mod_s *);
  86. void bfa_fcport_start(struct bfa_s *);
  87. void bfa_fcport_iocdisable(struct bfa_s *);
  88. void bfa_fcport_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
  89. struct bfa_s *);
  90. void bfa_fcport_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
  91. struct bfa_pcidev_s *);
  92. void bfa_fcxp_iocdisable(struct bfa_s *);
  93. void bfa_fcxp_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
  94. struct bfa_s *);
  95. void bfa_fcxp_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
  96. struct bfa_pcidev_s *);
  97. void bfa_fcdiag_iocdisable(struct bfa_s *);
  98. void bfa_fcdiag_attach(struct bfa_s *bfa, void *, struct bfa_iocfc_cfg_s *,
  99. struct bfa_pcidev_s *);
  100. void bfa_ioim_lm_init(struct bfa_s *);
  101. void bfa_lps_iocdisable(struct bfa_s *bfa);
  102. void bfa_lps_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
  103. struct bfa_s *);
  104. void bfa_lps_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
  105. struct bfa_pcidev_s *);
  106. void bfa_rport_iocdisable(struct bfa_s *bfa);
  107. void bfa_rport_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
  108. struct bfa_s *);
  109. void bfa_rport_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
  110. struct bfa_pcidev_s *);
  111. void bfa_sgpg_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
  112. struct bfa_s *);
  113. void bfa_sgpg_attach(struct bfa_s *, void *bfad, struct bfa_iocfc_cfg_s *,
  114. struct bfa_pcidev_s *);
  115. void bfa_uf_iocdisable(struct bfa_s *);
  116. void bfa_uf_meminfo(struct bfa_iocfc_cfg_s *, struct bfa_meminfo_s *,
  117. struct bfa_s *);
  118. void bfa_uf_attach(struct bfa_s *, void *, struct bfa_iocfc_cfg_s *,
  119. struct bfa_pcidev_s *);
  120. void bfa_uf_start(struct bfa_s *);
  121. #endif /* __BFA_MODULES_H__ */