From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: Adam Jackson <ajax@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add eeprom_bad_csum_allow module option to e1000.
Date: Tue, 23 Oct 2007 09:18:21 -0700 [thread overview]
Message-ID: <471E1ECD.80002@intel.com> (raw)
In-Reply-To: <11931515302013-git-send-email-ajax@redhat.com>
Adam Jackson wrote:
> 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@redhat.com>
NAK
wrong list, not sent to me, and while for e100 I was OK with this patch, for e1000
it really does not make sense to 'just allow' a bad checksum - if your eeprom is
randomly messed up then you cannot just fix it like this anyway.
Auke
> ---
> 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);
next prev parent reply other threads:[~2007-10-23 16:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 14:58 [PATCH] Add eeprom_bad_csum_allow module option to e1000 Adam Jackson
2007-10-23 16:18 ` Kok, Auke [this message]
2007-10-23 16:21 ` Adam Jackson
2007-10-23 17:09 ` Kok, Auke
2007-10-23 20:40 ` Jeff Garzik
2007-10-23 21:01 ` Kok, Auke
2007-10-23 21:51 ` David Miller
2007-10-23 21:20 ` Dave Jones
2007-10-23 21:38 ` Alan Cox
2007-10-23 21:53 ` David Miller
2007-10-23 23:19 ` Kok, Auke
2007-10-24 0:55 ` [PATCH] e1000, e1000e valid-addr fixes Jeff Garzik
2007-10-24 1:03 ` Jeff Garzik
2007-10-24 1:07 ` David Miller
2007-10-24 2:20 ` Jeff Garzik
2007-10-24 2:23 ` David Miller
2007-11-01 18:04 ` Kok, Auke
2007-11-01 18:47 ` Jeff Garzik
2007-11-01 18:11 ` Stephen Hemminger
2007-11-01 19:31 ` Jeff Garzik
2007-10-24 1:15 ` Adrian Bunk
2007-10-23 23:03 ` [PATCH] Add eeprom_bad_csum_allow module option to e1000 Kok, Auke
2007-10-23 23:53 ` Stephen Hemminger
2007-10-24 5:38 ` Dave Jones
2007-10-23 21:48 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2007-10-24 4:53 speedy
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=471E1ECD.80002@intel.com \
--to=auke-jan.h.kok@intel.com \
--cc=ajax@redhat.com \
--cc=linux-kernel@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