[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <11931515302013-git-send-email-ajax@redhat.com>
Date: Tue, 23 Oct 2007 10:58:50 -0400
From: Adam Jackson <ajax@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Adam Jackson <ajax@...hat.com>
Subject: [PATCH] Add eeprom_bad_csum_allow module option to e1000.
When the EEPROM gets corrupted, you can fix it with ethtool, but only if
the module loads and creates a network device. But, without this option,
if the EEPROM is corrupted, the driver will not create a network device.
Signed-off-by: Adam Jackson <ajax@...hat.com>
---
drivers/net/e1000/e1000_main.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index f1ce348..b308c32 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -255,6 +255,10 @@ static int debug = NETIF_MSG_DRV | NETIF_MSG_PROBE;
module_param(debug, int, 0);
MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
+static int eeprom_bad_csum_allow = 0;
+module_param(eeprom_bad_csum_allow, int, 0);
+MODULE_PARM_DESC(eeprom_bad_csum_allow, "Allow bad eeprom checksums");
+
/**
* e1000_init_module - Driver Registration Routine
*
@@ -1012,7 +1016,8 @@ e1000_probe(struct pci_dev *pdev,
if (e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
DPRINTK(PROBE, ERR, "The EEPROM Checksum Is Not Valid\n");
- goto err_eeprom;
+ if (!eeprom_bad_csum_allow)
+ goto err_eeprom;
}
/* copy the MAC address out of the EEPROM */
@@ -1024,7 +1029,8 @@ e1000_probe(struct pci_dev *pdev,
if (!is_valid_ether_addr(netdev->perm_addr)) {
DPRINTK(PROBE, ERR, "Invalid MAC Address\n");
- goto err_eeprom;
+ if (!eeprom_bad_csum_allow)
+ goto err_eeprom;
}
e1000_get_bus_info(&adapter->hw);
--
1.5.2.4
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists