git: ccb8ad1f645e - main - e1000: Accept uninitialized Tiger Lake NVM checksums

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Tue, 11 Aug 2026 19:46:19 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=ccb8ad1f645eb77d393eb81ff1b86b213b74bc87

commit ccb8ad1f645eb77d393eb81ff1b86b213b74bc87
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-11 18:57:52 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-11 19:44:17 +0000

    e1000: Accept uninitialized Tiger Lake NVM checksums
    
    Some transitional Tiger Lake systems shipped with an uninitialized
    checksum word.  Accept that state while continuing to validate newer
    read-only NVM images.
    
    MFC after:      2 weeks
---
 sys/dev/e1000/e1000_defines.h | 1 +
 sys/dev/e1000/e1000_nvm.c     | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/sys/dev/e1000/e1000_defines.h b/sys/dev/e1000/e1000_defines.h
index 9b8aca173856..fb21ad3d24b0 100644
--- a/sys/dev/e1000/e1000_defines.h
+++ b/sys/dev/e1000/e1000_defines.h
@@ -1177,6 +1177,7 @@
 
 /* For checksumming, the sum of all words in the NVM should equal 0xBABA. */
 #define NVM_SUM				0xBABA
+#define NVM_CHECKSUM_UNINITIALIZED	0xFFFF
 
 /* PBA (printed board assembly) number words */
 #define NVM_PBA_OFFSET_0		8
diff --git a/sys/dev/e1000/e1000_nvm.c b/sys/dev/e1000/e1000_nvm.c
index 8a26e1dd0427..bc5ca47eae34 100644
--- a/sys/dev/e1000/e1000_nvm.c
+++ b/sys/dev/e1000/e1000_nvm.c
@@ -1215,6 +1215,13 @@ s32 e1000_validate_nvm_checksum_generic(struct e1000_hw *hw)
 		checksum += nvm_data;
 	}
 
+	/* Some transitional TGP systems shipped with an empty checksum word. */
+	if (hw->mac.type == e1000_pch_tgp &&
+	    nvm_data == NVM_CHECKSUM_UNINITIALIZED) {
+		DEBUGOUT("Uninitialized NVM checksum on TGP; ignoring\n");
+		return E1000_SUCCESS;
+	}
+
 	if (checksum != (u16) NVM_SUM) {
 		DEBUGOUT("NVM Checksum Invalid\n");
 		return -E1000_ERR_NVM;