Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alice Michael <alice.michael@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S4 11/11] i40e: Revert ShadowRAM checksum calculation change
Date: Fri, 29 Mar 2019 15:08:40 -0700	[thread overview]
Message-ID: <20190329220840.51187-11-alice.michael@intel.com> (raw)
In-Reply-To: <20190329220840.51187-1-alice.michael@intel.com>

From: Maciej Paczkowski <maciej.paczkowski@intel.com>

The reason of this revert is unexpected issue found in NVM Update tool
during NVM image downgrade. The implementation is no longer needed
since the QV tools are already aware of new FW double ShadowRAM dump
mechanism.

This patch reverts ShadowRAM checksum calculation change introduced in
commit 9d12f0c4e436 ("i40e: Revert ShadowRAM checksum calculation change")

Signed-off-by: Maciej Paczkowski <maciej.paczkowski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_nvm.c | 28 +++-------------------
 1 file changed, 3 insertions(+), 25 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
index ee89779a9a6f..c508b75c3c09 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
@@ -574,36 +574,14 @@ static i40e_status i40e_calc_nvm_checksum(struct i40e_hw *hw,
 i40e_status i40e_update_nvm_checksum(struct i40e_hw *hw)
 {
 	i40e_status ret_code;
-	u16 checksum, checksum_sr;
+	u16 checksum;
 	__le16 le_sum;
 
 	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
-	if (ret_code)
-		return ret_code;
-
 	le_sum = cpu_to_le16(checksum);
-	ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
-				     1, &le_sum, true);
-	if (ret_code)
-		return ret_code;
-
-	/* Due to changes in FW the SW is required to perform double SR-dump
-	 * in some cases. SR-dump is the process when internal shadow RAM is
-	 * dumped into flash bank. It is triggered by setting "last_command"
-	 * argument in i40e_write_nvm_aq function call.
-	 * Since FW 1.8 we need to calculate SR checksum again and update it
-	 * in flash if it is not equal to previously computed checksum.
-	 * This situation would occur only in FW >= 1.8
-	 */
-	ret_code = i40e_calc_nvm_checksum(hw, &checksum_sr);
-	if (ret_code)
-		return ret_code;
-	if (checksum_sr != checksum) {
-		le_sum = cpu_to_le16(checksum_sr);
-		ret_code = i40e_write_nvm_aq(hw, 0x00,
-					     I40E_SR_SW_CHECKSUM_WORD,
+	if (!ret_code)
+		ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
 					     1, &le_sum, true);
-	}
 
 	return ret_code;
 }
-- 
2.19.2


  parent reply	other threads:[~2019-03-29 22:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29 22:08 [Intel-wired-lan] [next PATCH S4 01/11] i40e: VF's promiscuous attribute is not kept Alice Michael
2019-03-29 22:08 ` [Intel-wired-lan] [next PATCH S4 02/11] i40e: add new pci id for X710/XXV710 N3000 cards Alice Michael
2019-04-03 21:55   ` Bowers, AndrewX
2019-03-29 22:08 ` [Intel-wired-lan] [next PATCH S4 03/11] i40e: Setting VF to VLAN 0 requires restart Alice Michael
2019-04-03 21:56   ` Bowers, AndrewX
2019-03-29 22:08 ` [Intel-wired-lan] [next PATCH S4 04/11] i40e: add functions stubs to support EEE Alice Michael
2019-04-03 21:56   ` Bowers, AndrewX
2019-03-29 22:08 ` [Intel-wired-lan] [next PATCH S4 05/11] i40e: fix wrapping around netif_set_real_num_tx_queues Alice Michael
2019-04-03 21:57   ` Bowers, AndrewX
2019-03-29 22:08 ` [Intel-wired-lan] [next PATCH S4 06/11] i40e: Fix the typo in adding 40GE KR4 mode Alice Michael
2019-04-03 21:57   ` Bowers, AndrewX
2019-03-29 22:08 ` [Intel-wired-lan] [next PATCH S4 07/11] i40e: add num_vectors checker in iwarp handler Alice Michael
2019-04-03 21:58   ` Bowers, AndrewX
2019-03-29 22:08 ` [Intel-wired-lan] [next PATCH S4 08/11] i40e: Wrong truncation from u16 to u8 Alice Michael
2019-04-03 21:58   ` Bowers, AndrewX
2019-03-29 22:08 ` [Intel-wired-lan] [next PATCH S4 09/11] i40e: Add support for X710 B/P & SFP+ cards Alice Michael
2019-04-03 21:59   ` Bowers, AndrewX
2019-03-29 22:08 ` [Intel-wired-lan] [next PATCH S4 10/11] i40e: missing input validation on VF message handling by the PF Alice Michael
2019-04-03 21:59   ` Bowers, AndrewX
2019-03-29 22:08 ` Alice Michael [this message]
2019-04-03 22:00   ` [Intel-wired-lan] [next PATCH S4 11/11] i40e: Revert ShadowRAM checksum calculation change Bowers, AndrewX
2019-04-03 21:54 ` [Intel-wired-lan] [next PATCH S4 01/11] i40e: VF's promiscuous attribute is not kept Bowers, AndrewX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190329220840.51187-11-alice.michael@intel.com \
    --to=alice.michael@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox