Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v2 1/1] e1000e: Do not take care about recovery NVM checksum
@ 2021-07-18  4:10 Sasha Neftin
  2021-08-08 12:15 ` Fuxbrumer, Dvora
  0 siblings, 1 reply; 2+ messages in thread
From: Sasha Neftin @ 2021-07-18  4:10 UTC (permalink / raw)
  To: intel-wired-lan

On new platforms, the NVM is read-only. Attempting to update the NVM
is causing a lockup to occur. Do not attempt to write to the NVM
on platforms where it's not supported.
Emit an error message when the NVM checksum is invalid.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213667
Suggested-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Suggested-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 9bae4932a11d..a34010580bfc 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -4141,13 +4141,17 @@ static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw)
 		return ret_val;
 
 	if (!(data & valid_csum_mask)) {
-		data |= valid_csum_mask;
-		ret_val = e1000_write_nvm(hw, word, 1, &data);
-		if (ret_val)
-			return ret_val;
-		ret_val = e1000e_update_nvm_checksum(hw);
-		if (ret_val)
-			return ret_val;
+		e_dbg("NVM Checksum Invalid\n");
+
+		if (hw->mac.type < e1000_pch_cnp) {
+			data |= valid_csum_mask;
+			ret_val = e1000_write_nvm(hw, word, 1, &data);
+			if (ret_val)
+				return ret_val;
+			ret_val = e1000e_update_nvm_checksum(hw);
+			if (ret_val)
+				return ret_val;
+		}
 	}
 
 	return e1000e_validate_nvm_checksum_generic(hw);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Intel-wired-lan] [PATCH v2 1/1] e1000e: Do not take care about recovery NVM checksum
  2021-07-18  4:10 [Intel-wired-lan] [PATCH v2 1/1] e1000e: Do not take care about recovery NVM checksum Sasha Neftin
@ 2021-08-08 12:15 ` Fuxbrumer, Dvora
  0 siblings, 0 replies; 2+ messages in thread
From: Fuxbrumer, Dvora @ 2021-08-08 12:15 UTC (permalink / raw)
  To: intel-wired-lan

On 7/18/2021 07:10, Sasha Neftin wrote:
> On new platforms, the NVM is read-only. Attempting to update the NVM
> is causing a lockup to occur. Do not attempt to write to the NVM
> on platforms where it's not supported.
> Emit an error message when the NVM checksum is invalid.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213667
> Suggested-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
> Suggested-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
> ---
>   drivers/net/ethernet/intel/e1000e/ich8lan.c | 18 +++++++++++-------
>   1 file changed, 11 insertions(+), 7 deletions(-)
> 
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-08 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-18  4:10 [Intel-wired-lan] [PATCH v2 1/1] e1000e: Do not take care about recovery NVM checksum Sasha Neftin
2021-08-08 12:15 ` Fuxbrumer, Dvora

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox