Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198984
b: refs/heads/master
c: 7873ca4
h: refs/heads/master
v: v3
  • Loading branch information
Krishna Gudipati authored and James Bottomley committed May 25, 2010
1 parent 47adc36 commit 12c82a7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c38a2951026e6b428d3ce6e518d123c35becd18
refs/heads/master: 7873ca4e4401f0ecd8868bf1543113467e6bae61
22 changes: 22 additions & 0 deletions trunk/drivers/scsi/bfa/bfa_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,32 @@ bfa_cfg_get_meminfo(struct bfa_iocfc_cfg_s *cfg, struct bfa_meminfo_s *meminfo)
for (i = 0; hal_mods[i]; i++)
hal_mods[i]->meminfo(cfg, &km_len, &dm_len);

dm_len += bfa_port_meminfo();

meminfo->meminfo[BFA_MEM_TYPE_KVA - 1].mem_len = km_len;
meminfo->meminfo[BFA_MEM_TYPE_DMA - 1].mem_len = dm_len;
}

static void
bfa_com_port_attach(struct bfa_s *bfa, struct bfa_meminfo_s *mi)
{
struct bfa_port_s *port = &bfa->modules.port;
uint32_t dm_len;
uint8_t *dm_kva;
uint64_t dm_pa;

dm_len = bfa_port_meminfo();
dm_kva = bfa_meminfo_dma_virt(mi);
dm_pa = bfa_meminfo_dma_phys(mi);

memset(port, 0, sizeof(struct bfa_port_s));
bfa_port_attach(port, &bfa->ioc, bfa, bfa->trcmod, bfa->logm);
bfa_port_mem_claim(port, dm_kva, dm_pa);

bfa_meminfo_dma_virt(mi) = dm_kva + dm_len;
bfa_meminfo_dma_phys(mi) = dm_pa + dm_len;
}

/**
* Use this function to do attach the driver instance with the BFA
* library. This function will not trigger any HW initialization
Expand Down Expand Up @@ -140,6 +161,7 @@ bfa_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
for (i = 0; hal_mods[i]; i++)
hal_mods[i]->attach(bfa, bfad, cfg, meminfo, pcidev);

bfa_com_port_attach(bfa, meminfo);
}

/**
Expand Down

0 comments on commit 12c82a7

Please sign in to comment.