Skip to content

Commit 1c77080

Browse files
jacekkowNipaLocal
authored andcommitted
e1000e: ignore factory-default checksum value on TGP platform
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 empty checksum. NVM is not modifiable on this platform, hence ignore checksum 0xFFFF on Tiger Lake systems to work around this. Signed-off-by: Jacek Kowalski <[email protected]> Fixes: 4051f68 ("e1000e: Do not take care about recovery NVM checksum") Cc: [email protected] Reviewed-by: Simon Horman <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent f71362e commit 1c77080

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@
637637

638638
/* For checksumming, the sum of all words in the NVM should equal 0xBABA. */
639639
#define NVM_SUM 0xBABA
640+
#define NVM_SUM_FACTORY_DEFAULT 0xFFFF
640641

641642
/* PBA (printed board assembly) number words */
642643
#define NVM_PBA_OFFSET_0 8

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

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

561+
if (hw->mac.type == e1000_pch_tgp && checksum == (u16)NVM_SUM_FACTORY_DEFAULT) {
562+
e_dbg("Factory-default NVM Checksum on TGP platform - ignoring\n");
563+
return 0;
564+
}
565+
561566
if (checksum != (u16)NVM_SUM) {
562567
e_dbg("NVM Checksum Invalid\n");
563568
return -E1000_ERR_NVM;

0 commit comments

Comments
 (0)