[PATCH 8/6] net/e1000: log flash/invm status at probe time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Provide some info about flash/eeprom state at boot up

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 drivers/net/e1000/eeprom.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
index e5f8c9e271e0..cb92deee3b44 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -1472,6 +1472,24 @@ int e1000_register_eeprom(struct e1000_hw *hw)
 		if (ret < 0)
 			return ret;
 
+		if (eecd & E1000_EECD_AUTO_RD) {
+			if (eecd & E1000_EECD_EE_PRES) {
+				if (eecd & E1000_EECD_FLASH_IN_USE)
+					dev_info(hw->dev, "Hardware programmed from flash\n");
+				else
+					dev_info(hw->dev, "Hardware programmed from iNVM\n");
+			} else {
+				dev_warn(hw->dev, "Shadow RAM invalid\n");
+			}
+		} else {
+			/*
+			 * I never saw this case in practise and I'm unsure how
+			 * to handle that. Maybe just wait until the hardware is
+			 * up enough that this bit is set?
+			 */
+			dev_err(hw->dev, "Flash Auto-Read not done\n");
+		}
+
 		if (eecd & E1000_EECD_I210_FLASH_DETECTED) {
 			hw->mtd.parent = hw->dev;
 			hw->mtd.read = e1000_mtd_read;
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux