netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seved Torstendahl <seved.torstendahl@netinsight.net>
To: akpm@osdl.org
Cc: jgarzik@pobox.com, netdev@vger.kernel.org
Subject: PROBLEM: can't initiate empty  e100 eeprom
Date: Thu, 22 Mar 2007 11:56:44 +0100	[thread overview]
Message-ID: <460260EC.2040806@netinsight.net> (raw)


When we receive new CPU bourds the EEPROM for one Ethernet port is unprogrammed
i.e. contains only FF. The first thing to do is to perform some accepence tests
and to set the MAC address on this port using the tool eepro100-diag.
This worked with earlier kernels but now the e100.c driver refuses to do this.

The new module parameter eeprom_bad_csum_allow solves half the problem but
the check is_valid_ether_addr(...) at line 2669 fails and then the device
is removed (our line number due to other changes).

Suggestion: let the module parameter control this test as in the patch below.
We don't want to use a DOS tool!

Regards
Seved Torstendahl

-- 
Seved Torstendahl               Net Insight AB
Senior SW System Architect      Box 42093, S-126 14 Stockholm, SWEDEN
tel: + 46 8 685 04 38           Visiting Address: Västberga Allé 9, Hägersten
fax: + 46 8 685 04 20           http://www.netinsight.net


Index: e100.c
===================================================================
RCS file: /cvs/new-sw/kernel/kernel/drivers/net/e100.c,v
retrieving revision 1.2
diff -u -r1.2 e100.c
--- e100.c      23 Oct 2006 13:58:36 -0000      1.2
+++ e100.c      22 Mar 2007 10:09:22 -0000
@@ -2666,7 +2666,8 @@

         memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN);
         memcpy(netdev->perm_addr, nic->eeprom, ETH_ALEN);
-       if(!is_valid_ether_addr(netdev->perm_addr)) {
+       /* invalid MAC address (ff:ff:ff:ff:ff:ff) accepted, changed at installation */
+       if (!eeprom_bad_csum_allow && (!is_valid_ether_addr(netdev->perm_addr))) {
                 DPRINTK(PROBE, ERR, "Invalid MAC address from "
                         "EEPROM, aborting.\n");
                 err = -EAGAIN;




                 reply	other threads:[~2007-03-22 11:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=460260EC.2040806@netinsight.net \
    --to=seved.torstendahl@netinsight.net \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).