netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Auke Kok <auke-jan.h.kok@intel.com>
Cc: jeff@garzik.org, netdev@vger.kernel.org, davem@davemloft.net,
	john.ronciak@intel.com, jesse.brandeburg@intel.com,
	randy.dunlap@oracle.com
Subject: Re: [PATCH] e1000: Dump the eeprom when a user encounters a bad checksum
Date: Mon, 17 Dec 2007 14:14:58 -0800	[thread overview]
Message-ID: <1197929698.27386.61.camel@localhost> (raw)
In-Reply-To: <20071217215023.26270.62396.stgit@localhost.localdomain>

On Mon, 2007-12-17 at 13:50 -0800, Auke Kok wrote:
> diff --git a/drivers/net/e1000/e1000_main.c
> b/drivers/net/e1000/e1000_main.c
> index efd8c2d..aac55be 100644
> --- a/drivers/net/e1000/e1000_main.c
> +++ b/drivers/net/e1000/e1000_main.c
> @@ -979,23 +1036,29 @@ e1000_probe(struct pci_dev *pdev,
>  	e1000_reset_hw(&adapter->hw);
>  
>  	/* make sure the EEPROM is good */
> -
>  	if (e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
>  		DPRINTK(PROBE, ERR, "The EEPROM Checksum Is Not Valid\n");
> -		goto err_eeprom;
> +		e1000_dump_eeprom(adapter);
> +		/*
> +		 * set MAC address to all zeroes to invalidate and temporary
> +		 * disable this device for the user. This blocks regular
> +		 * traffic while still permitting ethtool ioctls from reaching
> +		 * the hardware as well as allowing the user to run the
> +		 * interface after manually setting a hw addr using
> +		 * `ip set address`
> +		 */
> +		memset(adapter->hw.mac_addr, 0, netdev->addr_len);

Do you need to set netdev->dev_addr too?

> +	} else {
> +		/* copy the MAC address out of the EEPROM */
> +		if (e1000_read_mac_addr(&adapter->hw))
> +			DPRINTK(PROBE, ERR, "EEPROM Read Error\n");
>  	}
> -
> -	/* copy the MAC address out of the EEPROM */
> -
> -	if (e1000_read_mac_addr(&adapter->hw))
> -		DPRINTK(PROBE, ERR, "EEPROM Read Error\n");
> +	/* don't block initalization here due to bad MAC address */

I just sent a patch to fix these typos and another pops up...

	initialization

cheers, Joe


  reply	other threads:[~2007-12-17 22:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17 21:50 [PATCH] e1000: Dump the eeprom when a user encounters a bad checksum Auke Kok
2007-12-17 22:14 ` Joe Perches [this message]
2007-12-18  1:17 ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2007-12-14 23:35 Auke Kok
2007-12-15  1:08 ` Randy Dunlap
2007-12-15  1:31 ` Joe Perches
2007-12-15 20:35   ` Kok, Auke

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=1197929698.27386.61.camel@localhost \
    --to=joe@perches.com \
    --cc=auke-jan.h.kok@intel.com \
    --cc=davem@davemloft.net \
    --cc=jeff@garzik.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    /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).