]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ice: Report NVM version numbers on mismatch during load
authorSergey Temerkhanov <sergey.temerkhanov@intel.com>
Tue, 6 Aug 2024 20:46:27 +0000 (13:46 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 26 Aug 2024 16:47:13 +0000 (09:47 -0700)
Report NVM version numbers (both detected and expected) when a mismatch b/w
driver and firmware is detected. This provides more useful information
about which NVM version the driver expects, rather than requiring manual
code inspection.

Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_controlq.c

index b5774035e6f9399c2c122fd1960afc8d8b115498..e3959ad442a23d2e7441fa4c6aec964a9b15ab82 100644 (file)
@@ -488,7 +488,7 @@ shutdown_sq_out:
 }
 
 /**
- * ice_aq_ver_check - Check the reported AQ API version.
+ * ice_aq_ver_check - Check the reported AQ API version
  * @hw: pointer to the hardware structure
  *
  * Checks if the driver should load on a given AQ API version.
@@ -508,14 +508,20 @@ static bool ice_aq_ver_check(struct ice_hw *hw)
        } else if (hw->api_maj_ver == exp_fw_api_ver_major) {
                if (hw->api_min_ver > (exp_fw_api_ver_minor + 2))
                        dev_info(ice_hw_to_dev(hw),
-                                "The driver for the device detected a newer version of the NVM image than expected. Please install the most recent version of the network driver.\n");
+                                "The driver for the device detected a newer version (%u.%u) of the NVM image than expected (%u.%u). Please install the most recent version of the network driver.\n",
+                                hw->api_maj_ver, hw->api_min_ver,
+                                exp_fw_api_ver_major, exp_fw_api_ver_minor);
                else if ((hw->api_min_ver + 2) < exp_fw_api_ver_minor)
                        dev_info(ice_hw_to_dev(hw),
-                                "The driver for the device detected an older version of the NVM image than expected. Please update the NVM image.\n");
+                                "The driver for the device detected an older version (%u.%u) of the NVM image than expected (%u.%u). Please update the NVM image.\n",
+                                hw->api_maj_ver, hw->api_min_ver,
+                                exp_fw_api_ver_major, exp_fw_api_ver_minor);
        } else {
                /* Major API version is older than expected, log a warning */
                dev_info(ice_hw_to_dev(hw),
-                        "The driver for the device detected an older version of the NVM image than expected. Please update the NVM image.\n");
+                        "The driver for the device detected an older version (%u.%u) of the NVM image than expected (%u.%u). Please update the NVM image.\n",
+                        hw->api_maj_ver, hw->api_min_ver,
+                        exp_fw_api_ver_major, exp_fw_api_ver_minor);
        }
        return true;
 }