]> git.karo-electronics.de Git - linux-beck.git/commitdiff
e100: allow bad MAC address when running with invalid eeprom csum
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Thu, 26 Apr 2007 16:43:11 +0000 (09:43 -0700)
committerJeff Garzik <jeff@garzik.org>
Sat, 28 Apr 2007 15:01:07 +0000 (11:01 -0400)
Seved Torstendahl <seved.torstendahl@netinsight.net> suggested to
let the module parameter for invalid eeprom checksum control the valid
mac address test.

If this bypass happens we should print a different message,
or at least one that is correct, maybe something like below

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/e100.c

index 71c6d334bd7f8aa3eb356e1ecf04c4b1ebe98bef..135617c5941f4a26ec8e464656570f1509dcd2f3 100644 (file)
@@ -2597,11 +2597,16 @@ static int __devinit e100_probe(struct pci_dev *pdev,
 
        memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN);
        memcpy(netdev->perm_addr, nic->eeprom, ETH_ALEN);
-       if(!is_valid_ether_addr(netdev->perm_addr)) {
-               DPRINTK(PROBE, ERR, "Invalid MAC address from "
-                       "EEPROM, aborting.\n");
-               err = -EAGAIN;
-               goto err_out_free;
+       if (!is_valid_ether_addr(netdev->perm_addr)) {
+               if (!eeprom_bad_csum_allow) {
+                       DPRINTK(PROBE, ERR, "Invalid MAC address from "
+                               "EEPROM, aborting.\n");
+                       err = -EAGAIN;
+                       goto err_out_free;
+               } else {
+                       DPRINTK(PROBE, ERR, "Invalid MAC address from EEPROM, "
+                               "you MUST configure one.\n");
+               }
        }
 
        /* Wol magic packet can be enabled from eeprom */