]> err.no Git - linux-2.6/commitdiff
[E100]: Add module option to ignore bad EEPROM checksums.
authorDavid S. Miller <davem@sunset.davemloft.net>
Tue, 29 Aug 2006 05:12:54 +0000 (22:12 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 30 Aug 2006 04:22:14 +0000 (21:22 -0700)
Several people run into the situation where the E100
EEPROM contents are fine, but the checksum hasn't been
set properly.  This renders the device useless for
them even though it would function correctly.

The default is off, which retains the current behavior.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/e100.c

index 91ef5f2fd76883807eb23a5678fdff79014b6d50..ce850f1078b574437a06a12065f43a2525fd8bd8 100644 (file)
@@ -173,8 +173,11 @@ MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
 
 static int debug = 3;
+static int eeprom_bad_csum_allow = 0;
 module_param(debug, int, 0);
+module_param(eeprom_bad_csum_allow, int, 0);
 MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
+MODULE_PARM_DESC(eeprom_bad_csum_allow, "Allow bad eeprom checksums");
 #define DPRINTK(nlevel, klevel, fmt, args...) \
        (void)((NETIF_MSG_##nlevel & nic->msg_enable) && \
        printk(KERN_##klevel PFX "%s: %s: " fmt, nic->netdev->name, \
@@ -756,7 +759,8 @@ static int e100_eeprom_load(struct nic *nic)
        checksum = le16_to_cpu(0xBABA - checksum);
        if(checksum != nic->eeprom[nic->eeprom_wc - 1]) {
                DPRINTK(PROBE, ERR, "EEPROM corrupted\n");
-               return -EAGAIN;
+               if (!eeprom_bad_csum_allow)
+                       return -EAGAIN;
        }
 
        return 0;