summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2018-01-26 14:32:31 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-01-30 07:53:49 +0100
commit6a187cf04b6acb0b8bcfa25f722fc686de20f9b4 (patch)
tree12dfc74fee7d18a64c884396532d5b8c69f316c5 /drivers
parent127837acde71b471888fe7d9ddd9125d39feb65b (diff)
downloadbarebox-6a187cf04b6acb0b8bcfa25f722fc686de20f9b4.tar.gz
barebox-6a187cf04b6acb0b8bcfa25f722fc686de20f9b4.tar.xz
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 <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/e1000/eeprom.c10
-rw-r--r--drivers/net/e1000/main.c2
2 files changed, 5 insertions, 7 deletions
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 */
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index 0139c4a6d7..bb6ab4eb03 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -3597,7 +3597,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *id)
}
}
- if (!e1000_eeprom_valid(hw) || e1000_validate_eeprom_checksum(hw))
+ if (e1000_validate_eeprom_checksum(hw))
return 0;
e1000_get_ethaddr(edev, edev->ethaddr);