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.
I think that you need to update the patch description. As of v3 it's
the last word of the checksum that is being checked, not the entire
checksum.
if (checksum != (u16)NVM_SUM) {
Unfortunately some systems have left the factory with an unmodified
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.
+#define NVM_CHECKSUM_FACTORY_DEFAULT 0xFFFF
Perhaps it is too long, but I liked Vlad's suggestion of naming this
NVM_CHECKSUM_WORD_FACTORY_DEFAULT.
+ if (hw->mac.type == e1000_pch_tgp && nvm_data == NVM_CHECKSUM_FACTORY_DEFAULT) {
Please wrap the line above so it is 80 columns wide or less.