From 6a187cf04b6acb0b8bcfa25f722fc686de20f9b4 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 26 Jan 2018 14:32:31 +0100 Subject: net/e1000: don't check EEPROM signature if populated from iNVM The EEPROM device will contain an invalid signature if it has been populated from iNVM. Since the iNVM enum type has been removed, the only way to tell if a signature check makes sense is to look at the EEPROM valid status. Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- drivers/net/e1000/eeprom.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'drivers/net/e1000/eeprom.c') diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c index 0a28dfdd88..b0408107bb 100644 --- a/drivers/net/e1000/eeprom.c +++ b/drivers/net/e1000/eeprom.c @@ -1006,12 +1006,10 @@ int e1000_validate_eeprom_checksum(struct e1000_hw *hw) DEBUGFUNC(); /* - Only the following three 'types' of EEPROM can be expected - to have correct EEPROM checksum - */ - if (hw->eeprom.type != e1000_eeprom_spi && - hw->eeprom.type != e1000_eeprom_microwire && - hw->eeprom.type != e1000_eeprom_flash) + * If the EEPROM device content isn't valid there is no point in + * checking the signature. + */ + if (!e1000_eeprom_valid(hw)) return 0; /* Read the EEPROM */ -- cgit v1.2.3