Skip to content

Commit 6111491

Browse files
jacekkowanguy11
authored andcommitted
e1000e: ignore uninitialized checksum word on tgp
As described by Vitaly Lifshits: > Starting from Tiger Lake, LAN NVM is locked for writes by SW, so the > driver cannot perform checksum validation and correction. This means > that all NVM images must leave the factory with correct checksum and > checksum valid bit set. Unfortunately some systems have left the factory with an uninitialized value of 0xFFFF at register address 0x3F (checksum word location). So on Tiger Lake platform we ignore the computed checksum when such condition is encountered. Signed-off-by: Jacek Kowalski <[email protected]> Tested-by: Vlad URSU <[email protected]> Fixes: 4051f68 ("e1000e: Do not take care about recovery NVM checksum") Cc: [email protected] Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Vitaly Lifshits <[email protected]> Tested-by: Mor Bar-Gabay <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 536fd74 commit 6111491

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

drivers/net/ethernet/intel/e1000e/defines.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,9 @@
638638
/* For checksumming, the sum of all words in the NVM should equal 0xBABA. */
639639
#define NVM_SUM 0xBABA
640640

641+
/* Uninitialized ("empty") checksum word value */
642+
#define NVM_CHECKSUM_UNINITIALIZED 0xFFFF
643+
641644
/* PBA (printed board assembly) number words */
642645
#define NVM_PBA_OFFSET_0 8
643646
#define NVM_PBA_OFFSET_1 9

drivers/net/ethernet/intel/e1000e/nvm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,12 @@ s32 e1000e_validate_nvm_checksum_generic(struct e1000_hw *hw)
558558
checksum += nvm_data;
559559
}
560560

561+
if (hw->mac.type == e1000_pch_tgp &&
562+
nvm_data == NVM_CHECKSUM_UNINITIALIZED) {
563+
e_dbg("Uninitialized NVM Checksum on TGP platform - ignoring\n");
564+
return 0;
565+
}
566+
561567
if (checksum != (u16)NVM_SUM) {
562568
e_dbg("NVM Checksum Invalid\n");
563569
return -E1000_ERR_NVM;

0 commit comments

Comments
 (0)