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 8D1ED458CD; Mon, 2 Sep 2024 11:55:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4736A40674; Mon, 2 Sep 2024 11:55:23 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by mails.dpdk.org (Postfix) with ESMTP id 088CA40653 for ; Mon, 2 Sep 2024 11:55:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725270903; x=1756806903; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vz35Qf/Kf/iFHkRX66YfnTbAPMidw+D5LgqIstdtv+Y=; b=N2gYMpcrY7jDUp/ihjym3Wt+owssnUej//S417XH/ZfdsmPvd8xkERIn absWePYpLGxc6njxD+vVg3jqcEXeNH/15MbFOqupL7pF9bId1McXJ+CS9 WKXw6nsDwmdqzM89quT++muF6TtDBX1B9gSYT9eR8/0QtDgN8UDjFYWgY XEgk6ckCem5hieCMtAwppseORK8ZED4NKybozKWCM7IIknp6DuIUWAkqM OxxKy8jdJdtMu+KkOEHR3u9L2EphojL+PhuBoeuwNKz25rflyGfSnyYaZ 71Qq/z+0Da7jiTIAYEnSvQjYiaFfXc6im+hCLBmzHajN4W7DrSKEzvLk2 w==; X-CSE-ConnectionGUID: F8shUO/uQHG3xlxFR1wX6Q== X-CSE-MsgGUID: H15SpnZeSoOamdDSPANO+w== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="26747187" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="26747187" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 02:55:02 -0700 X-CSE-ConnectionGUID: h15Aql7EQ5qe+9tdpf2XCQ== X-CSE-MsgGUID: OhnQbHPYTF6OX5aKTGqgDw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="64597879" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa009.fm.intel.com with ESMTP; 02 Sep 2024 02:55:01 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: bruce.richardson@intel.com Subject: [PATCH v1 06/30] net/i40e/base: fix misleading debug logs and comments Date: Mon, 2 Sep 2024 10:54:18 +0100 Message-ID: X-Mailer: git-send-email 2.43.5 In-Reply-To: References: 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 From: Aleksandr Loktionov Both comments and debug logs for i40e_read_nvm_aq refer to writing, when in actuality it's a read function. Fix both comments and debug logs. Signed-off-by: Aleksandr Loktionov Signed-off-by: Anatoly Burakov --- drivers/net/i40e/base/i40e_nvm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index f385042601..05816a4b79 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -223,11 +223,11 @@ STATIC enum i40e_status_code i40e_read_nvm_word_srctl(struct i40e_hw *hw, * @hw: pointer to the HW structure. * @module_pointer: module pointer location in words from the NVM beginning * @offset: offset in words from module start - * @words: number of words to write - * @data: buffer with words to write to the Shadow RAM + * @words: number of words to read + * @data: buffer with words to read from the Shadow RAM * @last_command: tells the AdminQ that this is the last command * - * Writes a 16 bit words buffer to the Shadow RAM using the admin command. + * Reads a 16 bit words buffer to the Shadow RAM using the admin command. **/ STATIC enum i40e_status_code i40e_read_nvm_aq(struct i40e_hw *hw, u8 module_pointer, u32 offset, @@ -249,18 +249,18 @@ STATIC enum i40e_status_code i40e_read_nvm_aq(struct i40e_hw *hw, */ if ((offset + words) > hw->nvm.sr_size) i40e_debug(hw, I40E_DEBUG_NVM, - "NVM write error: offset %d beyond Shadow RAM limit %d\n", + "NVM read error: offset %d beyond Shadow RAM limit %d\n", (offset + words), hw->nvm.sr_size); else if (words > I40E_SR_SECTOR_SIZE_IN_WORDS) - /* We can write only up to 4KB (one sector), in one AQ write */ + /* We can read only up to 4KB (one sector), in one AQ read */ i40e_debug(hw, I40E_DEBUG_NVM, - "NVM write fail error: tried to write %d words, limit is %d.\n", + "NVM read fail error: tried to read %d words, limit is %d.\n", words, I40E_SR_SECTOR_SIZE_IN_WORDS); else if (((offset + (words - 1)) / I40E_SR_SECTOR_SIZE_IN_WORDS) != (offset / I40E_SR_SECTOR_SIZE_IN_WORDS)) - /* A single write cannot spread over two sectors */ + /* A single read cannot spread over two sectors */ i40e_debug(hw, I40E_DEBUG_NVM, - "NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n", + "NVM read error: cannot spread over two sectors in a single read offset=%d words=%d\n", offset, words); else ret_code = i40e_aq_read_nvm(hw, module_pointer, -- 2.43.5