From: Stephen Hemminger Date: Wed, 23 Mar 2016 15:51:36 +0000 (-0700) Subject: nfp: fix PCI device info retrieval X-Git-Tag: spdx-start~7140 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=79c4319c1a5d66c656b0997d7ea8fc3a42d91cae;p=dpdk.git nfp: fix PCI device info retrieval The NFP driver (unlike other PCI devices) was not copying the pci info from the pci_dev to the eth_dev. This would make the driver_name be null (and other unset fields) when application uses dev_info_get. This was found by code review; do not have the hardware. Fixes: d4a27a3b092a ("nfp: add basic features") Signed-off-by: Stephen Hemminger Acked-by: Alejandro Lucero --- diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 92ae48a060..f12288c112 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2337,6 +2337,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev) return 0; pci_dev = eth_dev->pci_dev; + rte_eth_copy_pci_info(eth_dev, pci_dev); + hw->device_id = pci_dev->id.device_id; hw->vendor_id = pci_dev->id.vendor_id; hw->subsystem_device_id = pci_dev->id.subsystem_device_id;