X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fthunderx%2Fnicvf_ethdev.c;h=471cc168828d5f6aff45f599db70a4ee9fa4f0c6;hb=98a7ea332ba3da0f74ec951595d36a616165b255;hp=3421415cb6a0c03efc737cac4ba308dbd9871f4a;hpb=95b097c8033ed7901a8a424490d3e52e2bd7b5b0;p=dpdk.git diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 3421415cb6..471cc16882 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -1373,11 +1373,11 @@ static void nicvf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) { struct nicvf *nic = nicvf_pmd_priv(dev); - struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev->device); + struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); PMD_INIT_FUNC_TRACE(); - dev_info->pci_dev = RTE_DEV_TO_PCI(dev->device); + dev_info->pci_dev = RTE_ETH_DEV_TO_PCI(dev); dev_info->min_rx_bufsize = ETHER_MIN_MTU; dev_info->max_rx_pktlen = NIC_HW_MAX_FRS; @@ -2024,7 +2024,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev) } } - pci_dev = RTE_DEV_TO_PCI(eth_dev->device); + pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); rte_eth_copy_pci_info(eth_dev, pci_dev); nic->device_id = pci_dev->id.device_id; @@ -2086,7 +2086,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev) goto fail; } - /* Detach port by returning postive error number */ + /* Detach port by returning positive error number */ return ENOTSUP; } @@ -2171,7 +2171,8 @@ static int nicvf_eth_pci_remove(struct rte_pci_device *pci_dev) static struct rte_pci_driver rte_nicvf_pmd = { .id_table = pci_id_nicvf_map, - .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_KEEP_MAPPED_RES | + RTE_PCI_DRV_INTR_LSC, .probe = nicvf_eth_pci_probe, .remove = nicvf_eth_pci_remove, };