bfa.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. /*
  2. * Copyright (c) 2005-2010 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_H__
  18. #define __BFA_H__
  19. #include "bfad_drv.h"
  20. #include "bfa_cs.h"
  21. #include "bfa_plog.h"
  22. #include "bfa_defs_svc.h"
  23. #include "bfi.h"
  24. #include "bfa_ioc.h"
  25. struct bfa_s;
  26. typedef void (*bfa_isr_func_t) (struct bfa_s *bfa, struct bfi_msg_s *m);
  27. typedef void (*bfa_cb_cbfn_t) (void *cbarg, bfa_boolean_t complete);
  28. /*
  29. * Interrupt message handlers
  30. */
  31. void bfa_isr_unhandled(struct bfa_s *bfa, struct bfi_msg_s *m);
  32. /*
  33. * Request and response queue related defines
  34. */
  35. #define BFA_REQQ_NELEMS_MIN (4)
  36. #define BFA_RSPQ_NELEMS_MIN (4)
  37. #define bfa_reqq_pi(__bfa, __reqq) ((__bfa)->iocfc.req_cq_pi[__reqq])
  38. #define bfa_reqq_ci(__bfa, __reqq) \
  39. (*(u32 *)((__bfa)->iocfc.req_cq_shadow_ci[__reqq].kva))
  40. #define bfa_reqq_full(__bfa, __reqq) \
  41. (((bfa_reqq_pi(__bfa, __reqq) + 1) & \
  42. ((__bfa)->iocfc.cfg.drvcfg.num_reqq_elems - 1)) == \
  43. bfa_reqq_ci(__bfa, __reqq))
  44. #define bfa_reqq_next(__bfa, __reqq) \
  45. (bfa_reqq_full(__bfa, __reqq) ? NULL : \
  46. ((void *)((struct bfi_msg_s *)((__bfa)->iocfc.req_cq_ba[__reqq].kva) \
  47. + bfa_reqq_pi((__bfa), (__reqq)))))
  48. #define bfa_reqq_produce(__bfa, __reqq, __mh) do { \
  49. (__mh).mtag.h2i.qid = (__bfa)->iocfc.hw_qid[__reqq];\
  50. (__bfa)->iocfc.req_cq_pi[__reqq]++; \
  51. (__bfa)->iocfc.req_cq_pi[__reqq] &= \
  52. ((__bfa)->iocfc.cfg.drvcfg.num_reqq_elems - 1); \
  53. writel((__bfa)->iocfc.req_cq_pi[__reqq], \
  54. (__bfa)->iocfc.bfa_regs.cpe_q_pi[__reqq]); \
  55. mmiowb(); \
  56. } while (0)
  57. #define bfa_rspq_pi(__bfa, __rspq) \
  58. (*(u32 *)((__bfa)->iocfc.rsp_cq_shadow_pi[__rspq].kva))
  59. #define bfa_rspq_ci(__bfa, __rspq) ((__bfa)->iocfc.rsp_cq_ci[__rspq])
  60. #define bfa_rspq_elem(__bfa, __rspq, __ci) \
  61. (&((struct bfi_msg_s *)((__bfa)->iocfc.rsp_cq_ba[__rspq].kva))[__ci])
  62. #define CQ_INCR(__index, __size) do { \
  63. (__index)++; \
  64. (__index) &= ((__size) - 1); \
  65. } while (0)
  66. /*
  67. * Queue element to wait for room in request queue. FIFO order is
  68. * maintained when fullfilling requests.
  69. */
  70. struct bfa_reqq_wait_s {
  71. struct list_head qe;
  72. void (*qresume) (void *cbarg);
  73. void *cbarg;
  74. };
  75. /*
  76. * Circular queue usage assignments
  77. */
  78. enum {
  79. BFA_REQQ_IOC = 0, /* all low-priority IOC msgs */
  80. BFA_REQQ_FCXP = 0, /* all FCXP messages */
  81. BFA_REQQ_LPS = 0, /* all lport service msgs */
  82. BFA_REQQ_PORT = 0, /* all port messages */
  83. BFA_REQQ_FLASH = 0, /* for flash module */
  84. BFA_REQQ_DIAG = 0, /* for diag module */
  85. BFA_REQQ_RPORT = 0, /* all port messages */
  86. BFA_REQQ_SBOOT = 0, /* all san boot messages */
  87. BFA_REQQ_QOS_LO = 1, /* all low priority IO */
  88. BFA_REQQ_QOS_MD = 2, /* all medium priority IO */
  89. BFA_REQQ_QOS_HI = 3, /* all high priority IO */
  90. };
  91. static inline void
  92. bfa_reqq_winit(struct bfa_reqq_wait_s *wqe, void (*qresume) (void *cbarg),
  93. void *cbarg)
  94. {
  95. wqe->qresume = qresume;
  96. wqe->cbarg = cbarg;
  97. }
  98. #define bfa_reqq(__bfa, __reqq) (&(__bfa)->reqq_waitq[__reqq])
  99. /*
  100. * static inline void
  101. * bfa_reqq_wait(struct bfa_s *bfa, int reqq, struct bfa_reqq_wait_s *wqe)
  102. */
  103. #define bfa_reqq_wait(__bfa, __reqq, __wqe) do { \
  104. \
  105. struct list_head *waitq = bfa_reqq(__bfa, __reqq); \
  106. \
  107. WARN_ON(((__reqq) >= BFI_IOC_MAX_CQS)); \
  108. WARN_ON(!((__wqe)->qresume && (__wqe)->cbarg)); \
  109. \
  110. list_add_tail(&(__wqe)->qe, waitq); \
  111. } while (0)
  112. #define bfa_reqq_wcancel(__wqe) list_del(&(__wqe)->qe)
  113. /*
  114. * Generic BFA callback element.
  115. */
  116. struct bfa_cb_qe_s {
  117. struct list_head qe;
  118. bfa_cb_cbfn_t cbfn;
  119. bfa_boolean_t once;
  120. void *cbarg;
  121. };
  122. #define bfa_cb_queue(__bfa, __hcb_qe, __cbfn, __cbarg) do { \
  123. (__hcb_qe)->cbfn = (__cbfn); \
  124. (__hcb_qe)->cbarg = (__cbarg); \
  125. list_add_tail(&(__hcb_qe)->qe, &(__bfa)->comp_q); \
  126. } while (0)
  127. #define bfa_cb_dequeue(__hcb_qe) list_del(&(__hcb_qe)->qe)
  128. #define bfa_cb_queue_once(__bfa, __hcb_qe, __cbfn, __cbarg) do { \
  129. (__hcb_qe)->cbfn = (__cbfn); \
  130. (__hcb_qe)->cbarg = (__cbarg); \
  131. if (!(__hcb_qe)->once) { \
  132. list_add_tail(&(__hcb_qe)->qe, &(__bfa)->comp_q); \
  133. (__hcb_qe)->once = BFA_TRUE; \
  134. } \
  135. } while (0)
  136. #define bfa_cb_queue_done(__hcb_qe) do { \
  137. (__hcb_qe)->once = BFA_FALSE; \
  138. } while (0)
  139. /*
  140. * PCI devices supported by the current BFA
  141. */
  142. struct bfa_pciid_s {
  143. u16 device_id;
  144. u16 vendor_id;
  145. };
  146. extern char bfa_version[];
  147. /*
  148. * BFA memory resources
  149. */
  150. enum bfa_mem_type {
  151. BFA_MEM_TYPE_KVA = 1, /* Kernel Virtual Memory *(non-dma-able) */
  152. BFA_MEM_TYPE_DMA = 2, /* DMA-able memory */
  153. BFA_MEM_TYPE_MAX = BFA_MEM_TYPE_DMA,
  154. };
  155. struct bfa_mem_elem_s {
  156. enum bfa_mem_type mem_type; /* see enum bfa_mem_type */
  157. u32 mem_len; /* Total Length in Bytes */
  158. u8 *kva; /* kernel virtual address */
  159. u64 dma; /* dma address if DMA memory */
  160. u8 *kva_curp; /* kva allocation cursor */
  161. u64 dma_curp; /* dma allocation cursor */
  162. };
  163. struct bfa_meminfo_s {
  164. struct bfa_mem_elem_s meminfo[BFA_MEM_TYPE_MAX];
  165. };
  166. #define bfa_meminfo_kva(_m) \
  167. ((_m)->meminfo[BFA_MEM_TYPE_KVA - 1].kva_curp)
  168. #define bfa_meminfo_dma_virt(_m) \
  169. ((_m)->meminfo[BFA_MEM_TYPE_DMA - 1].kva_curp)
  170. #define bfa_meminfo_dma_phys(_m) \
  171. ((_m)->meminfo[BFA_MEM_TYPE_DMA - 1].dma_curp)
  172. struct bfa_iocfc_regs_s {
  173. void __iomem *intr_status;
  174. void __iomem *intr_mask;
  175. void __iomem *cpe_q_pi[BFI_IOC_MAX_CQS];
  176. void __iomem *cpe_q_ci[BFI_IOC_MAX_CQS];
  177. void __iomem *cpe_q_ctrl[BFI_IOC_MAX_CQS];
  178. void __iomem *rme_q_ci[BFI_IOC_MAX_CQS];
  179. void __iomem *rme_q_pi[BFI_IOC_MAX_CQS];
  180. void __iomem *rme_q_ctrl[BFI_IOC_MAX_CQS];
  181. };
  182. /*
  183. * MSIX vector handlers
  184. */
  185. #define BFA_MSIX_MAX_VECTORS 22
  186. typedef void (*bfa_msix_handler_t)(struct bfa_s *bfa, int vec);
  187. struct bfa_msix_s {
  188. int nvecs;
  189. bfa_msix_handler_t handler[BFA_MSIX_MAX_VECTORS];
  190. };
  191. /*
  192. * Chip specific interfaces
  193. */
  194. struct bfa_hwif_s {
  195. void (*hw_reginit)(struct bfa_s *bfa);
  196. void (*hw_reqq_ack)(struct bfa_s *bfa, int reqq);
  197. void (*hw_rspq_ack)(struct bfa_s *bfa, int rspq);
  198. void (*hw_msix_init)(struct bfa_s *bfa, int nvecs);
  199. void (*hw_msix_ctrl_install)(struct bfa_s *bfa);
  200. void (*hw_msix_queue_install)(struct bfa_s *bfa);
  201. void (*hw_msix_uninstall)(struct bfa_s *bfa);
  202. void (*hw_isr_mode_set)(struct bfa_s *bfa, bfa_boolean_t msix);
  203. void (*hw_msix_getvecs)(struct bfa_s *bfa, u32 *vecmap,
  204. u32 *nvecs, u32 *maxvec);
  205. void (*hw_msix_get_rme_range) (struct bfa_s *bfa, u32 *start,
  206. u32 *end);
  207. int cpe_vec_q0;
  208. int rme_vec_q0;
  209. };
  210. typedef void (*bfa_cb_iocfc_t) (void *cbarg, enum bfa_status status);
  211. struct bfa_faa_cbfn_s {
  212. bfa_cb_iocfc_t faa_cbfn;
  213. void *faa_cbarg;
  214. };
  215. #define BFA_FAA_ENABLED 1
  216. #define BFA_FAA_DISABLED 2
  217. /*
  218. * FAA attributes
  219. */
  220. struct bfa_faa_attr_s {
  221. wwn_t faa;
  222. u8 faa_state;
  223. u8 pwwn_source;
  224. u8 rsvd[6];
  225. };
  226. struct bfa_faa_args_s {
  227. struct bfa_faa_attr_s *faa_attr;
  228. struct bfa_faa_cbfn_s faa_cb;
  229. u8 faa_state;
  230. bfa_boolean_t busy;
  231. };
  232. struct bfa_iocfc_s {
  233. struct bfa_s *bfa;
  234. struct bfa_iocfc_cfg_s cfg;
  235. int action;
  236. u32 req_cq_pi[BFI_IOC_MAX_CQS];
  237. u32 rsp_cq_ci[BFI_IOC_MAX_CQS];
  238. u8 hw_qid[BFI_IOC_MAX_CQS];
  239. struct bfa_cb_qe_s init_hcb_qe;
  240. struct bfa_cb_qe_s stop_hcb_qe;
  241. struct bfa_cb_qe_s dis_hcb_qe;
  242. struct bfa_cb_qe_s stats_hcb_qe;
  243. bfa_boolean_t cfgdone;
  244. struct bfa_dma_s cfg_info;
  245. struct bfi_iocfc_cfg_s *cfginfo;
  246. struct bfa_dma_s cfgrsp_dma;
  247. struct bfi_iocfc_cfgrsp_s *cfgrsp;
  248. struct bfa_dma_s req_cq_ba[BFI_IOC_MAX_CQS];
  249. struct bfa_dma_s req_cq_shadow_ci[BFI_IOC_MAX_CQS];
  250. struct bfa_dma_s rsp_cq_ba[BFI_IOC_MAX_CQS];
  251. struct bfa_dma_s rsp_cq_shadow_pi[BFI_IOC_MAX_CQS];
  252. struct bfa_iocfc_regs_s bfa_regs; /* BFA device registers */
  253. struct bfa_hwif_s hwif;
  254. bfa_cb_iocfc_t updateq_cbfn; /* bios callback function */
  255. void *updateq_cbarg; /* bios callback arg */
  256. u32 intr_mask;
  257. struct bfa_faa_args_s faa_args;
  258. };
  259. #define bfa_fn_lpu(__bfa) \
  260. bfi_fn_lpu(bfa_ioc_pcifn(&(__bfa)->ioc), bfa_ioc_portid(&(__bfa)->ioc))
  261. #define bfa_msix_init(__bfa, __nvecs) \
  262. ((__bfa)->iocfc.hwif.hw_msix_init(__bfa, __nvecs))
  263. #define bfa_msix_ctrl_install(__bfa) \
  264. ((__bfa)->iocfc.hwif.hw_msix_ctrl_install(__bfa))
  265. #define bfa_msix_queue_install(__bfa) \
  266. ((__bfa)->iocfc.hwif.hw_msix_queue_install(__bfa))
  267. #define bfa_msix_uninstall(__bfa) \
  268. ((__bfa)->iocfc.hwif.hw_msix_uninstall(__bfa))
  269. #define bfa_isr_rspq_ack(__bfa, __queue) do { \
  270. if ((__bfa)->iocfc.hwif.hw_rspq_ack) \
  271. (__bfa)->iocfc.hwif.hw_rspq_ack(__bfa, __queue); \
  272. } while (0)
  273. #define bfa_isr_reqq_ack(__bfa, __queue) do { \
  274. if ((__bfa)->iocfc.hwif.hw_reqq_ack) \
  275. (__bfa)->iocfc.hwif.hw_reqq_ack(__bfa, __queue); \
  276. } while (0)
  277. #define bfa_isr_mode_set(__bfa, __msix) do { \
  278. if ((__bfa)->iocfc.hwif.hw_isr_mode_set) \
  279. (__bfa)->iocfc.hwif.hw_isr_mode_set(__bfa, __msix); \
  280. } while (0)
  281. #define bfa_msix_getvecs(__bfa, __vecmap, __nvecs, __maxvec) \
  282. ((__bfa)->iocfc.hwif.hw_msix_getvecs(__bfa, __vecmap, \
  283. __nvecs, __maxvec))
  284. #define bfa_msix_get_rme_range(__bfa, __start, __end) \
  285. ((__bfa)->iocfc.hwif.hw_msix_get_rme_range(__bfa, __start, __end))
  286. #define bfa_msix(__bfa, __vec) \
  287. ((__bfa)->msix.handler[__vec](__bfa, __vec))
  288. /*
  289. * FC specific IOC functions.
  290. */
  291. void bfa_iocfc_meminfo(struct bfa_iocfc_cfg_s *cfg, u32 *km_len,
  292. u32 *dm_len);
  293. void bfa_iocfc_attach(struct bfa_s *bfa, void *bfad,
  294. struct bfa_iocfc_cfg_s *cfg,
  295. struct bfa_meminfo_s *meminfo,
  296. struct bfa_pcidev_s *pcidev);
  297. void bfa_iocfc_init(struct bfa_s *bfa);
  298. void bfa_iocfc_start(struct bfa_s *bfa);
  299. void bfa_iocfc_stop(struct bfa_s *bfa);
  300. void bfa_iocfc_isr(void *bfa, struct bfi_mbmsg_s *msg);
  301. void bfa_iocfc_set_snsbase(struct bfa_s *bfa, u64 snsbase_pa);
  302. bfa_boolean_t bfa_iocfc_is_operational(struct bfa_s *bfa);
  303. void bfa_iocfc_reset_queues(struct bfa_s *bfa);
  304. void bfa_msix_all(struct bfa_s *bfa, int vec);
  305. void bfa_msix_reqq(struct bfa_s *bfa, int vec);
  306. void bfa_msix_rspq(struct bfa_s *bfa, int vec);
  307. void bfa_msix_lpu_err(struct bfa_s *bfa, int vec);
  308. void bfa_hwcb_reginit(struct bfa_s *bfa);
  309. void bfa_hwcb_rspq_ack(struct bfa_s *bfa, int rspq);
  310. void bfa_hwcb_msix_init(struct bfa_s *bfa, int nvecs);
  311. void bfa_hwcb_msix_ctrl_install(struct bfa_s *bfa);
  312. void bfa_hwcb_msix_queue_install(struct bfa_s *bfa);
  313. void bfa_hwcb_msix_uninstall(struct bfa_s *bfa);
  314. void bfa_hwcb_isr_mode_set(struct bfa_s *bfa, bfa_boolean_t msix);
  315. void bfa_hwcb_msix_getvecs(struct bfa_s *bfa, u32 *vecmap, u32 *nvecs,
  316. u32 *maxvec);
  317. void bfa_hwcb_msix_get_rme_range(struct bfa_s *bfa, u32 *start,
  318. u32 *end);
  319. void bfa_hwct_reginit(struct bfa_s *bfa);
  320. void bfa_hwct2_reginit(struct bfa_s *bfa);
  321. void bfa_hwct_reqq_ack(struct bfa_s *bfa, int rspq);
  322. void bfa_hwct_rspq_ack(struct bfa_s *bfa, int rspq);
  323. void bfa_hwct_msix_init(struct bfa_s *bfa, int nvecs);
  324. void bfa_hwct_msix_ctrl_install(struct bfa_s *bfa);
  325. void bfa_hwct_msix_queue_install(struct bfa_s *bfa);
  326. void bfa_hwct_msix_uninstall(struct bfa_s *bfa);
  327. void bfa_hwct_isr_mode_set(struct bfa_s *bfa, bfa_boolean_t msix);
  328. void bfa_hwct_msix_getvecs(struct bfa_s *bfa, u32 *vecmap, u32 *nvecs,
  329. u32 *maxvec);
  330. void bfa_hwct_msix_get_rme_range(struct bfa_s *bfa, u32 *start,
  331. u32 *end);
  332. void bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t *wwns);
  333. wwn_t bfa_iocfc_get_pwwn(struct bfa_s *bfa);
  334. wwn_t bfa_iocfc_get_nwwn(struct bfa_s *bfa);
  335. int bfa_iocfc_get_pbc_vports(struct bfa_s *bfa,
  336. struct bfi_pbc_vport_s *pbc_vport);
  337. /*
  338. *----------------------------------------------------------------------
  339. * BFA public interfaces
  340. *----------------------------------------------------------------------
  341. */
  342. #define bfa_stats(_mod, _stats) ((_mod)->stats._stats++)
  343. #define bfa_ioc_get_stats(__bfa, __ioc_stats) \
  344. bfa_ioc_fetch_stats(&(__bfa)->ioc, __ioc_stats)
  345. #define bfa_ioc_clear_stats(__bfa) \
  346. bfa_ioc_clr_stats(&(__bfa)->ioc)
  347. #define bfa_get_nports(__bfa) \
  348. bfa_ioc_get_nports(&(__bfa)->ioc)
  349. #define bfa_get_adapter_manufacturer(__bfa, __manufacturer) \
  350. bfa_ioc_get_adapter_manufacturer(&(__bfa)->ioc, __manufacturer)
  351. #define bfa_get_adapter_model(__bfa, __model) \
  352. bfa_ioc_get_adapter_model(&(__bfa)->ioc, __model)
  353. #define bfa_get_adapter_serial_num(__bfa, __serial_num) \
  354. bfa_ioc_get_adapter_serial_num(&(__bfa)->ioc, __serial_num)
  355. #define bfa_get_adapter_fw_ver(__bfa, __fw_ver) \
  356. bfa_ioc_get_adapter_fw_ver(&(__bfa)->ioc, __fw_ver)
  357. #define bfa_get_adapter_optrom_ver(__bfa, __optrom_ver) \
  358. bfa_ioc_get_adapter_optrom_ver(&(__bfa)->ioc, __optrom_ver)
  359. #define bfa_get_pci_chip_rev(__bfa, __chip_rev) \
  360. bfa_ioc_get_pci_chip_rev(&(__bfa)->ioc, __chip_rev)
  361. #define bfa_get_ioc_state(__bfa) \
  362. bfa_ioc_get_state(&(__bfa)->ioc)
  363. #define bfa_get_type(__bfa) \
  364. bfa_ioc_get_type(&(__bfa)->ioc)
  365. #define bfa_get_mac(__bfa) \
  366. bfa_ioc_get_mac(&(__bfa)->ioc)
  367. #define bfa_get_mfg_mac(__bfa) \
  368. bfa_ioc_get_mfg_mac(&(__bfa)->ioc)
  369. #define bfa_get_fw_clock_res(__bfa) \
  370. ((__bfa)->iocfc.cfgrsp->fwcfg.fw_tick_res)
  371. void bfa_get_pciids(struct bfa_pciid_s **pciids, int *npciids);
  372. void bfa_cfg_get_default(struct bfa_iocfc_cfg_s *cfg);
  373. void bfa_cfg_get_min(struct bfa_iocfc_cfg_s *cfg);
  374. void bfa_cfg_get_meminfo(struct bfa_iocfc_cfg_s *cfg,
  375. struct bfa_meminfo_s *meminfo);
  376. void bfa_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
  377. struct bfa_meminfo_s *meminfo,
  378. struct bfa_pcidev_s *pcidev);
  379. void bfa_detach(struct bfa_s *bfa);
  380. void bfa_cb_init(void *bfad, bfa_status_t status);
  381. void bfa_cb_updateq(void *bfad, bfa_status_t status);
  382. bfa_boolean_t bfa_intx(struct bfa_s *bfa);
  383. void bfa_isr_enable(struct bfa_s *bfa);
  384. void bfa_isr_disable(struct bfa_s *bfa);
  385. void bfa_comp_deq(struct bfa_s *bfa, struct list_head *comp_q);
  386. void bfa_comp_process(struct bfa_s *bfa, struct list_head *comp_q);
  387. void bfa_comp_free(struct bfa_s *bfa, struct list_head *comp_q);
  388. typedef void (*bfa_cb_ioc_t) (void *cbarg, enum bfa_status status);
  389. void bfa_iocfc_get_attr(struct bfa_s *bfa, struct bfa_iocfc_attr_s *attr);
  390. bfa_status_t bfa_iocfc_israttr_set(struct bfa_s *bfa,
  391. struct bfa_iocfc_intr_attr_s *attr);
  392. void bfa_iocfc_enable(struct bfa_s *bfa);
  393. void bfa_iocfc_disable(struct bfa_s *bfa);
  394. #define bfa_timer_start(_bfa, _timer, _timercb, _arg, _timeout) \
  395. bfa_timer_begin(&(_bfa)->timer_mod, _timer, _timercb, _arg, _timeout)
  396. #endif /* __BFA_H__ */