From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC9A2A00C3; Mon, 15 Aug 2022 01:24:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D720642C4B; Mon, 15 Aug 2022 01:22:55 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 1D49842C31 for ; Mon, 15 Aug 2022 01:22:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660519374; x=1692055374; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z58zPy8cHOpQPVirc0kJ1USM6VJSR3au+ZUvN1FnZwc=; b=eKNbYTAiaowalRUOMfM+Yix3STrBdfEv6RrRygtZjHB5W5dg1Rs8KALr abv415Bwi58kBSIjUwQ5G73FZ9YswoIuUzN08zjvNvgHJF3Ns0thrqkAA mumsHJ70wk8g0FW2yW1FKDiZbYluFz9m3p1bqjOYpLcqf0jVvO85Ojhtn HSz3z6+swk1GJbKVum1ENj8hbJhqVJlu5o+gFcIev8z8XtzQ1HmQ6Mbvn RmQU+vKbiQ1A6sLm5sYexzsogJVuiHWeenFk4+f/Ppj+bbT18pGPwHPDC 9fuujdMOnGZGogl2CFTh2tXygWRmcwmTt+x28TYBc26XU++trxfmoFogS g==; X-IronPort-AV: E=McAfee;i="6400,9594,10439"; a="291857953" X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="291857953" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2022 16:22:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="635283123" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.4]) by orsmga008.jf.intel.com with ESMTP; 14 Aug 2022 16:22:52 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Sergey Temerkhanov Subject: [PATCH v2 23/70] net/ice/base: report NVM version numbers on mismatch Date: Mon, 15 Aug 2022 03:31:19 -0400 Message-Id: <20220815073206.2917968-24-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220815073206.2917968-1-qi.z.zhang@intel.com> References: <20220815071306.2910599-1-qi.z.zhang@intel.com> <20220815073206.2917968-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Report NVM version numbers (both detected and expected) when a mismatch b/w driver and firmware is detected. This would provide more useful information about which NVM version the driver expects instead of looking up the code Signed-off-by: Sergey Temerkhanov Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_controlq.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice_controlq.c index cdd067ce7f..d83d0d76d0 100644 --- a/drivers/net/ice/base/ice_controlq.c +++ b/drivers/net/ice/base/ice_controlq.c @@ -495,12 +495,18 @@ static bool ice_aq_ver_check(struct ice_hw *hw) return false; } else if (hw->api_maj_ver == EXP_FW_API_VER_MAJOR) { if (hw->api_min_ver > (EXP_FW_API_VER_MINOR + 2)) - ice_info(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"); + ice_info(hw, "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) - ice_info(hw, "The driver for the device detected an older version of the NVM image than expected. Please update the NVM image.\n"); + ice_info(hw, "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 */ - ice_info(hw, "The driver for the device detected an older version of the NVM image than expected. Please update the NVM image.\n"); + ice_info(hw, "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; } -- 2.31.1