if (virtio_negotiate_features(hw, req_features) < 0)
return -1;
+ if (eth_dev->device) {
+ pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
+ rte_eth_copy_pci_info(eth_dev, pci_dev);
+ }
+
/* If host does not support status then disable LSC */
if (!vtpci_with_feature(hw, VIRTIO_NET_F_STATUS))
eth_dev->data->dev_flags &= ~RTE_ETH_DEV_INTR_LSC;
else
eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
- if (eth_dev->device) {
- pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
- rte_eth_copy_pci_info(eth_dev, pci_dev);
- eth_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE;
- }
-
rx_func_get(eth_dev);
/* Setting up rx_header size for the device */