[dpdk-dev,1/1] virtio: call rte_eth_copy_pci_info() later
diff mbox

Message ID 1449242066-27257-1-git-send-email-bernard.iremonger@intel.com
State Accepted, archived
Headers show

Commit Message

Bernard Iremonger Dec. 4, 2015, 3:14 p.m. UTC
call rte_eth_copy_pci_info() after the RTE_PCI_DRV_INTR_LSC
has been initialised.

Fixes: eeefe73f0af1("drivers: copy PCI device info to ethdev data")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Monjalon Dec. 6, 2015, 10:37 p.m. UTC | #1
2015-12-04 15:14, Bernard Iremonger:
> call rte_eth_copy_pci_info() after the RTE_PCI_DRV_INTR_LSC
> has been initialised.
> 
> Fixes: eeefe73f0af1("drivers: copy PCI device info to ethdev data")
> 
> Reported-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>

Applied, thanks

Patch
diff mbox

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 74c00ee..ae7c281 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1289,8 +1289,6 @@  eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
 
 	pci_dev = eth_dev->pci_dev;
 
-	rte_eth_copy_pci_info(eth_dev, pci_dev);
-
 	if (virtio_resource_init(pci_dev) < 0)
 		return -1;
 
@@ -1311,6 +1309,8 @@  eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
 	if (!vtpci_with_feature(hw, VIRTIO_NET_F_STATUS))
 		pci_dev->driver->drv_flags &= ~RTE_PCI_DRV_INTR_LSC;
 
+	rte_eth_copy_pci_info(eth_dev, pci_dev);
+
 	rx_func_get(eth_dev);
 
 	/* Setting up rx_header size for the device */