Skip to contentSkip to conversation

e1000e: Do not take care about recovery NVM checksum

PATCH Superseded Sasha Neftin 3 participants 6 messages Jul 15, 2021 – Aug 8, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 e1000e: Do not take care about recovery NVM checksum

According to the HW De, integrated GbE sets to read-only after programming a unique MAC address. The driver should not take care of NVM checksum updating starting from Tiger Lake.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213667

---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +13 -8
index 9bae4932a11d..e273e14a3419 100644
@@ -4140,14 +4140,19 @@ static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw)
 	if (ret_val)
 		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;
+	if (!(data & valid_csum_mask))
+		e_dbg("NVM Checksum Invalid\n");
+
+	if (hw->mac.type < e1000_pch_cnp) {
+		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;
+		}
 	}
 
 	return e1000e_validate_nvm_checksum_generic(hw);
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 e1000e: Do not take care about recovery NVM checksum

Dear Sasha,

Am 15.07.21 um 09:03 schrieb Sasha Neftin:

Please describe the problem first (lockup) (maybe by summarizing the bug report).

Quoted 1 line

According to the HW De, integrated GbE sets to read-only after

Please use *developers*.

Quoted 1 line

programming a unique MAC address. The driver should not take care of

Excuse my ignorance, who is programming the MAC address?

Quoted 1 line

NVM checksum updating starting from Tiger Lake.

Who is updating the checksum? Please reference some datasheet name, revision and section.

Quoted 16 lines

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213667

---
  drivers/net/ethernet/intel/e1000e/ich8lan.c | 21 +++++++++++++--------
  1 file changed, 13 insertions(+), 8 deletions(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
index 9bae4932a11d..e273e14a3419 100644
@@ -4140,14 +4140,19 @@ static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw)
  	if (ret_val)
  		return ret_val;
 

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw) · line 4144

Quoted 10 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +2 -8
-	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;
+	if (!(data & valid_csum_mask))
+		e_dbg("NVM Checksum Invalid\n");

I?d spell it: NVM checksum invalid

Shouldn?t this be at least a warning? It?d be good to elaborate for users seeing this message. Something like: Your device might not work. Please check your firmware or contact the developers.

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw) · line 4147

Quoted 3 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +3 -0
+
+	if (hw->mac.type < e1000_pch_cnp) {
+		if (!(data & valid_csum_mask)) {

As it?s the same check as above, I?d move this whole block into the if condition above.

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw) · line 4158

Quoted 11 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +8 -0
+			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);

Kind regards,

Paul

#2 lore raw

PATCH 1/1 e1000e: Do not take care about recovery NVM checksum

Quoted 11 lines · Paul Menzel

Dear Sasha,

Am 15.07.21 um 09:03 schrieb Sasha Neftin:

Please describe the problem first (lockup) (maybe by summarizing the bug report).

Quoted 1 line

According to the HW De, integrated GbE sets to read-only after

Please use *developers*.

I meant: hardware design

Quoted 9 lines
Quoted 2 lines

programming a unique MAC address. The driver should not take care of

Excuse my ignorance, who is programming the MAC address?OS vendors and PC vendors

Quoted 1 line

NVM checksum updating starting from Tiger Lake.

Who is updating the checksum? Please reference some datasheet name, revision and section.

OS vendors and PC vendors
It is described in Intel RCR 1308265811 - I do not know if published externally. I've cc'd our front customer expert (Rex) - please, ask him if it published.

Quoted 31 lines
Quoted 18 lines

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213667

---
? drivers/net/ethernet/intel/e1000e/ich8lan.c | 21 +++++++++++++-------- ? 1 file changed, 13 insertions(+), 8 deletions(-)

drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
index 9bae4932a11d..e273e14a3419 100644
@@ -4140,14 +4140,19 @@ static s32 
 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw)
 ????? if (ret_val)
 ????????? return ret_val;

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 · line 4144

Quoted 10 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +2 -8
-??? 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;
+??? if (!(data & valid_csum_mask))
+??????? e_dbg("NVM Checksum Invalid\n");

I?d spell it: NVM checksum invalid

Quoted 3 lines

Shouldn?t this be at least a warning? It?d be good to elaborate for users seeing this message. Something like: Your device might not work. Please check your firmware or contact the developers.

to be consistent used same warning format as in nvm.c: ("NVM Checksum Invalid\n");

Quoted 7 lines

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 · line 4147

Quoted 4 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +3 -0
+
+??? if (hw->mac.type < e1000_pch_cnp) {
+??????? if (!(data & valid_csum_mask)) {

As it?s the same check as above, I?d move this whole block into the if condition above.

For old devices will performed checksum recovery.
NVM checksum validate will be processed for all.

Quoted 12 lines

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 · line 4157

Quoted 11 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +8 -0
+??????????? 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);
Quoted 3 lines

Kind regards,

Paul

Paul,
Thanks for your comments.
sasha

#3 lore raw

PATCH 1/1 e1000e: Do not take care about recovery NVM checksum

Dear Sasha,

Am 15.07.21 um 09:54 schrieb Sasha Neftin:

Quoted 11 lines · Paul Menzel
Quoted 9 lines

Am 15.07.21 um 09:03 schrieb Sasha Neftin:

Please describe the problem first (lockup) (maybe by summarizing the bug report).

Quoted 1 line

According to the HW De, integrated GbE sets to read-only after

Please use *developers*.

I meant: hardware design

Hah. Thank you for the clarification. It?d be great, if you used that in the v2.

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

programming a unique MAC address. The driver should not take care of

Excuse my ignorance, who is programming the MAC address? OS vendors and PC vendors

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

NVM checksum updating starting from Tiger Lake.

Who is updating the checksum? Please reference some datasheet name, revision and section.

OS vendors and PC vendors
It is described in Intel RCR 1308265811 - I do not know if published externally. I've cc'd our front customer expert (Rex) - please, ask him if it published.

Even if not published, please still reference it. (Though public datasheets by default would be nice.)

Quoted 30 lines
Quoted 30 lines
Quoted 17 lines

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213667

---
? drivers/net/ethernet/intel/e1000e/ich8lan.c | 21 +++++++++++++-------- ? 1 file changed, 13 insertions(+), 8 deletions(-)

drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
index 9bae4932a11d..e273e14a3419 100644
@@ -4140,14 +4140,19 @@ static s32 
 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw)
 ????? if (ret_val)
 ????????? return ret_val;

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 · line 4144

Quoted 10 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +2 -8
-??? 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;
+??? if (!(data & valid_csum_mask))
+??????? e_dbg("NVM Checksum Invalid\n");

I?d spell it: NVM checksum invalid

Quoted 5 lines
Quoted 3 lines

Shouldn?t this be at least a warning? It?d be good to elaborate for users seeing this message. Something like: Your device might not work. Please check your firmware or contact the developers.

to be consistent used same warning format as in nvm.c: ("NVM Checksum Invalid\n");

For consistency, is it possible to factor the NVM stuff out into nvm.c?

Also, the message should contain, that the manufacturer is at fault and should be contacted.

Quoted 8 lines
Quoted 6 lines

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 · line 4147

Quoted 3 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +3 -0
+
+??? if (hw->mac.type < e1000_pch_cnp) {
+??????? if (!(data & valid_csum_mask)) {

As it?s the same check as above, I?d move this whole block into the if condition above.

For old devices will performed checksum recovery.
NVM checksum validate will be processed for all.

I meant:

```
if (!(data & valid_csum_mask)) {
	e_dbg("NVM Checksum Invalid\n");

	if (hw->mac.type < e1000_pch_cnp) {
		data |= valid_csum_mask;
		[?]
	}
}
return e1000e_validate_nvm_checksum_generic(hw);
```
Quoted 10 lines
Quoted 10 lines

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 · line 4157

Quoted 10 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +8 -0
+??????????? 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);

Kind regards,

Paul

#4 lore raw

PATCH 1/1 e1000e: Do not take care about recovery NVM checksum

Quoted 11 lines · Paul Menzel

Dear Sasha,

Am 15.07.21 um 09:54 schrieb Sasha Neftin:

Quoted 7 lines · Paul Menzel
Quoted 6 lines

Am 15.07.21 um 09:03 schrieb Sasha Neftin:

Please describe the problem first (lockup) (maybe by summarizing the bug report).

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line

According to the HW De, integrated GbE sets to read-only after

Please use *developers*.

I meant: hardware design

Hah. Thank you for the clarification. It?d be great, if you used that in the v2.

no problem

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 2 lines

programming a unique MAC address. The driver should not take care of

Excuse my ignorance, who is programming the MAC address? OS vendors and PC vendors

Quoted 1 line

NVM checksum updating starting from Tiger Lake.

Who is updating the checksum? Please reference some datasheet name, revision and section.

Quoted 8 lines
Quoted 4 lines

OS vendors and PC vendors
It is described in Intel RCR 1308265811 - I do not know if published externally. I've cc'd our front customer expert (Rex) - please, ask him if it published.

Even if not published, please still reference it. (Though public datasheets by default would be nice.)

definitely

Quoted 46 lines
Quoted 31 lines
Quoted 31 lines
Quoted 18 lines

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213667

---
? drivers/net/ethernet/intel/e1000e/ich8lan.c | 21
+++++++++++++--------
? 1 file changed, 13 insertions(+), 8 deletions(-)

drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
index 9bae4932a11d..e273e14a3419 100644
@@ -4140,14 +4140,19 @@ static s32 
 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw)
 ????? if (ret_val)
 ????????? return ret_val;

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 · line 4144

Quoted 10 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +2 -8
-??? 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;
+??? if (!(data & valid_csum_mask))
+??????? e_dbg("NVM Checksum Invalid\n");

I?d spell it: NVM checksum invalid

Quoted 5 lines
Quoted 3 lines

Shouldn?t this be at least a warning? It?d be good to elaborate for users seeing this message. Something like: Your device might not work. Please check your firmware or contact the developers.

to be consistent used same warning format as in nvm.c: ("NVM Checksum Invalid\n");

For consistency, is it possible to factor the NVM stuff out into nvm.c?

Also, the message should contain, that the manufacturer is at fault and should be contacted.

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +3 -0
+
+??? if (hw->mac.type < e1000_pch_cnp) {
+??????? if (!(data & valid_csum_mask)) {
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

As it?s the same check as above, I?d move this whole block into the if condition above.

For old devices will performed checksum recovery.
NVM checksum validate will be processed for all.

I meant:

Good idea, sure.

Quoted 24 lines
```
if (!(data & valid_csum_mask)) {
 ????e_dbg("NVM Checksum Invalid\n");

 ????if (hw->mac.type < e1000_pch_cnp) {
 ??????? data |= valid_csum_mask;
 ??????? [?]
 ????}
}
return e1000e_validate_nvm_checksum_generic(hw);
```
Quoted 10 lines
Quoted 10 lines

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 · line 4157

Quoted 10 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +8 -0
+??????????? 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);
Quoted 3 lines

Kind regards,

Paul

I'll process v2.
Sasha

#5 lore raw

PATCH 1/1 e1000e: Do not take care about recovery NVM checksum

In reply to Sasha Neftin
Quoted 4 lines · Sasha Neftin

According to the HW De, integrated GbE sets to read-only after programming a unique MAC address. The driver should not take care of NVM checksum updating starting from Tiger Lake.

Quoted 8 lines

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213667

---
  drivers/net/ethernet/intel/e1000e/ich8lan.c | 21 +++++++++++++--------
  1 file changed, 13 insertions(+), 8 deletions(-)