net/bnxt: fix FW rule deletion on representor create
[dpdk.git] / drivers / net / hns3 / hns3_cmd.c
index c799363..cbb0988 100644 (file)
@@ -490,6 +490,7 @@ err_crq:
 int
 hns3_cmd_init(struct hns3_hw *hw)
 {
+       uint32_t version;
        int ret;
 
        rte_spinlock_lock(&hw->cmq.csq.lock);
@@ -518,13 +519,22 @@ hns3_cmd_init(struct hns3_hw *hw)
        }
        rte_atomic16_clear(&hw->reset.disable_cmd);
 
-       ret = hns3_cmd_query_firmware_version(hw, &hw->fw_version);
+       ret = hns3_cmd_query_firmware_version(hw, &version);
        if (ret) {
                PMD_INIT_LOG(ERR, "firmware version query failed %d", ret);
                goto err_cmd_init;
        }
 
-       PMD_INIT_LOG(INFO, "The firmware version is %08x", hw->fw_version);
+       hw->fw_version = version;
+       PMD_INIT_LOG(INFO, "The firmware version is %lu.%lu.%lu.%lu",
+                    hns3_get_field(version, HNS3_FW_VERSION_BYTE3_M,
+                                   HNS3_FW_VERSION_BYTE3_S),
+                    hns3_get_field(version, HNS3_FW_VERSION_BYTE2_M,
+                                   HNS3_FW_VERSION_BYTE2_S),
+                    hns3_get_field(version, HNS3_FW_VERSION_BYTE1_M,
+                                   HNS3_FW_VERSION_BYTE1_S),
+                    hns3_get_field(version, HNS3_FW_VERSION_BYTE0_M,
+                                   HNS3_FW_VERSION_BYTE0_S));
 
        return 0;