net/qede: fix FW version string for VF
authorRasesh Mody <rasesh.mody@cavium.com>
Tue, 25 Apr 2017 07:28:42 +0000 (00:28 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 28 Apr 2017 12:46:18 +0000 (14:46 +0200)
In SRIOV testing, print adapter info shows firmware version used by PF,
this patch provides fix to populate correct firmware version used by VF.

Fixes: 86a2265e59d7 ("qede: add SRIOV support")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/qede_main.c

index 307b33a..d7847d1 100644 (file)
@@ -359,11 +359,12 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
        rte_memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
               ETHER_ADDR_LEN);
 
+       dev_info->fw_major = FW_MAJOR_VERSION;
+       dev_info->fw_minor = FW_MINOR_VERSION;
+       dev_info->fw_rev = FW_REVISION_VERSION;
+       dev_info->fw_eng = FW_ENGINEERING_VERSION;
+
        if (IS_PF(edev)) {
-               dev_info->fw_major = FW_MAJOR_VERSION;
-               dev_info->fw_minor = FW_MINOR_VERSION;
-               dev_info->fw_rev = FW_REVISION_VERSION;
-               dev_info->fw_eng = FW_ENGINEERING_VERSION;
                dev_info->mf_mode = edev->mf_mode;
                dev_info->tx_switching = false;
 
@@ -384,10 +385,6 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
                        ecore_ptt_release(ECORE_LEADING_HWFN(edev), ptt);
                }
        } else {
-               ecore_vf_get_fw_version(&edev->hwfns[0], &dev_info->fw_major,
-                                       &dev_info->fw_minor, &dev_info->fw_rev,
-                                       &dev_info->fw_eng);
-
                ecore_mcp_get_mfw_ver(ECORE_LEADING_HWFN(edev), ptt,
                                      &dev_info->mfw_rev, NULL);
        }