bfa_modules.h 4.5 KB

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