/* This call will fail, if the cap is out of range compared to pre-defined values within the BFA library */
void bfa_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo, struct bfa_pcidev_s *pcidev)
/* This call will fail, if the cap is out of range compared to pre-defined values within the BFA library */
void bfa_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo, struct bfa_pcidev_s *pcidev)
{
	int             i;
	struct bfa_mem_elem_s *melem;
	bfa->fcs = BFA_FALSE;
	bfa_assert((cfg != NULL) && (meminfo != NULL));
	for (i = 0; i < BFA_MEM_TYPE_MAX; i++) {
		melem = meminfo->meminfo + i;
		melem->kva_curp = melem->kva;
		melem->dma_curp = melem->dma;
	}
	bfa_iocfc_attach(bfa, bfad, cfg, meminfo, pcidev);
	for (i = 0; hal_mods[i]; i++)
		hal_mods[i]->attach(bfa, bfad, cfg, meminfo, pcidev);
}