Go to the documentation of this file.
26 #define BFA_IOC_TOV 3000
27 #define BFA_IOC_HWSEM_TOV 500
28 #define BFA_IOC_HB_TOV 500
29 #define BFA_IOC_POLL_TOV 200
30 #define BNA_DBG_FWTRC_LEN (BFI_IOC_TRC_ENTS * BFI_IOC_TRC_ENT_SZ + \
50 #define BFA_DMA_ALIGN_SZ 256
53 #define BFI_SMEM_CB_SIZE 0x200000U
54 #define BFI_SMEM_CT_SIZE 0x280000U
57 #define bfa_dma_be_addr_set(dma_addr, pa) \
58 __bfa_dma_be_addr_set(&dma_addr, (u64)pa)
66 #define bfa_alen_set(__alen, __len, __pa) \
67 __bfa_alen_set(__alen, __len, (u64)__pa)
152 #define bfa_ioc_notify_init(__notify, __cbfn, __cbarg) do { \
153 (__notify)->cbfn = (__cbfn); \
154 (__notify)->cbarg = (__cbarg); \
220 #define bfa_ioc_pcifn(__ioc) ((__ioc)->pcidev.pci_func)
221 #define bfa_ioc_devid(__ioc) ((__ioc)->pcidev.device_id)
222 #define bfa_ioc_bar0(__ioc) ((__ioc)->pcidev.pci_bar_kva)
223 #define bfa_ioc_portid(__ioc) ((__ioc)->port_id)
224 #define bfa_ioc_asic_gen(__ioc) ((__ioc)->asic_gen)
225 #define bfa_ioc_fetch_stats(__ioc, __stats) \
226 (((__stats)->drv_stats) = (__ioc)->stats)
227 #define bfa_ioc_clr_stats(__ioc) \
228 memset(&(__ioc)->stats, 0, sizeof((__ioc)->stats))
229 #define bfa_ioc_maxfrsize(__ioc) ((__ioc)->attr->maxfrsize)
230 #define bfa_ioc_rx_bbcredit(__ioc) ((__ioc)->attr->rx_bbcredit)
231 #define bfa_ioc_speed_sup(__ioc) \
232 BFI_ADAPTER_GETP(SPEED, (__ioc)->attr->adapter_prop)
233 #define bfa_ioc_get_nports(__ioc) \
234 BFI_ADAPTER_GETP(NPORTS, (__ioc)->attr->adapter_prop)
236 #define bfa_ioc_stats(_ioc, _stats) ((_ioc)->stats._stats++)
237 #define bfa_ioc_stats_hb_count(_ioc, _hb_count) \
238 ((_ioc)->stats.hb_count = (_hb_count))
239 #define BFA_IOC_FWIMG_MINSZ (16 * 1024)
240 #define BFA_IOC_FW_SMEM_SIZE(__ioc) \
241 ((bfa_ioc_asic_gen(__ioc) == BFI_ASIC_GEN_CB) \
242 ? BFI_SMEM_CB_SIZE : BFI_SMEM_CT_SIZE)
243 #define BFA_IOC_FLASH_CHUNK_NO(off) (off / BFI_FLASH_CHUNK_SZ_WORDS)
244 #define BFA_IOC_FLASH_OFFSET_IN_CHUNK(off) (off % BFI_FLASH_CHUNK_SZ_WORDS)
245 #define BFA_IOC_FLASH_CHUNK_ADDR(chunkno) (chunkno * BFI_FLASH_CHUNK_SZ_WORDS)
257 #define bfa_ioc_pll_init_asic(__ioc) \
258 ((__ioc)->ioc_hwif->ioc_pll_init((__ioc)->pcidev.pci_bar_kva, \
261 #define bfa_ioc_isr_mode_set(__ioc, __msix) do { \
262 if ((__ioc)->ioc_hwif->ioc_isr_mode_set) \
263 ((__ioc)->ioc_hwif->ioc_isr_mode_set(__ioc, __msix)); \
265 #define bfa_ioc_ownership_reset(__ioc) \
266 ((__ioc)->ioc_hwif->ioc_ownership_reset(__ioc))
268 #define bfa_ioc_lpu_read_stat(__ioc) do { \
269 if ((__ioc)->ioc_hwif->ioc_lpu_read_stat) \
270 ((__ioc)->ioc_hwif->ioc_lpu_read_stat(__ioc)); \