net/qede: add vendor/device id info
authorRasesh Mody <rasesh.mody@cavium.com>
Fri, 23 Dec 2016 00:49:57 +0000 (16:49 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:40:52 +0000 (19:40 +0100)
The vendor_id and device_id are used to determine device type. If you
don't have them, then check for determining device type fails and is
always set to default device type.

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/qede_ethdev.c

index 258c599..8a62f3b 100644 (file)
@@ -2075,6 +2075,10 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 
        rte_eth_copy_pci_info(eth_dev, pci_dev);
 
+       /* @DPDK */
+       edev->vendor_id = pci_dev->id.vendor_id;
+       edev->device_id = pci_dev->id.device_id;
+
        qed_ops = qed_get_eth_ops();
        if (!qed_ops) {
                DP_ERR(edev, "Failed to get qed_eth_ops_pass\n");