]> git.droids-corp.org - dpdk.git/commitdiff
e1000: fix PCI device info with secondary process
authorJon DeVree <nuxi@vault24.org>
Mon, 23 Nov 2015 15:13:53 +0000 (10:13 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 23 Nov 2015 22:51:14 +0000 (23:51 +0100)
This fixes a bug added to em and igb drivers which causes the pci info
seen by the primary process to become invalidated by secondary process
startup.
This call was added after the process type check in the other drivers.

Fixes: eeefe73f0af1 ("drivers: copy PCI device info to ethdev data")
Signed-off-by: Jon DeVree <nuxi@vault24.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
drivers/net/e1000/em_ethdev.c
drivers/net/e1000/igb_ethdev.c

index 3e811098b27eef50ca11f0ec5770b41c6ab15547..66e89933060a785f9b400cfc787cbf578a3a39a5 100644 (file)
@@ -244,8 +244,6 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
 
        pci_dev = eth_dev->pci_dev;
 
-       rte_eth_copy_pci_info(eth_dev, pci_dev);
-
        eth_dev->dev_ops = &eth_em_ops;
        eth_dev->rx_pkt_burst = (eth_rx_burst_t)&eth_em_recv_pkts;
        eth_dev->tx_pkt_burst = (eth_tx_burst_t)&eth_em_xmit_pkts;
@@ -260,6 +258,8 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
                return 0;
        }
 
+       rte_eth_copy_pci_info(eth_dev, pci_dev);
+
        hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
        hw->device_id = pci_dev->id.device_id;
        adapter->stopped = 0;
index 88995b0ea86ea3207efcbd4efcfcd057600d293b..0dc63576823d22ab8f2745baf8e0ab9353d05458 100644 (file)
@@ -647,8 +647,6 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
 
        pci_dev = eth_dev->pci_dev;
 
-       rte_eth_copy_pci_info(eth_dev, pci_dev);
-
        eth_dev->dev_ops = &eth_igb_ops;
        eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
        eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
@@ -662,6 +660,8 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
                return 0;
        }
 
+       rte_eth_copy_pci_info(eth_dev, pci_dev);
+
        hw->hw_addr= (void *)pci_dev->mem_resource[0].addr;
 
        igb_identify_hardware(eth_dev);