MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_map_pci_bars

Function bnxt_map_pci_bars

dpdk/drivers/net/bnxt/bnxt_ethdev.c:4723–4740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4721}
4722
4723static int bnxt_map_pci_bars(struct rte_eth_dev *eth_dev)
4724{
4725 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
4726 struct bnxt *bp = eth_dev->data->dev_private;
4727
4728 /* enable device (incl. PCI PM wakeup), and bus-mastering */
4729 bp->bar0 = (void *)pci_dev->mem_resource[0].addr;
4730 bp->doorbell_base = (void *)pci_dev->mem_resource[2].addr;
4731 if (!bp->bar0 || !bp->doorbell_base) {
4732 PMD_DRV_LOG(ERR, "Unable to access Hardware\n");
4733 return -ENODEV;
4734 }
4735
4736 bp->eth_dev = eth_dev;
4737 bp->pdev = pci_dev;
4738
4739 return 0;
4740}
4741
4742static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
4743 struct bnxt_ctx_pg_info *ctx_pg,

Callers 1

bnxt_drv_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected