netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/4] skge: handle zero address at open
Date: Fri, 02 Feb 2007 08:22:51 -0800	[thread overview]
Message-ID: <20070202162419.046994000@linux-foundation.org> (raw)
In-Reply-To: 20070202162250.980620000@linux-foundation.org

[-- Attachment #1: skge-bad-rom.patch --]
[-- Type: text/plain, Size: 1101 bytes --]

Some motherboards are broken and have no address set. Failing at probe time 
prevents the device from ever being used (like to download a fixed BIOS). Instead
warn on probe and check again when device is brought up. That way the address
can be set.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>


--- skge.orig/drivers/net/skge.c
+++ skge/drivers/net/skge.c
@@ -2373,6 +2373,9 @@ static int skge_up(struct net_device *de
 	size_t rx_size, tx_size;
 	int err;
 
+	if (!is_valid_ether_addr(dev->dev_addr))
+		return -EINVAL;
+
 	if (netif_msg_ifup(skge))
 		printk(KERN_INFO PFX "%s: enabling interface\n", dev->name);
 
@@ -3567,11 +3570,10 @@ static int __devinit skge_probe(struct p
 	if (!dev)
 		goto err_out_led_off;
 
+	/* Some motherboards are broken and has zero in ROM. */
 	if (!is_valid_ether_addr(dev->dev_addr)) {
-		printk(KERN_ERR PFX "%s: bad (zero?) ethernet address in rom\n",
+		printk(KERN_WARNING PFX "%s: bad (zero?) ethernet address in rom\n",
 		       pci_name(pdev));
-		err = -EIO;
-		goto err_out_free_netdev;
 	}
 
 	err = register_netdev(dev);

-- 


  reply	other threads:[~2007-02-02 16:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-02 16:22 [PATCH 0/4] skge: update Stephen Hemminger
2007-02-02 16:22 ` Stephen Hemminger [this message]
2007-02-07  0:08   ` [PATCH 1/4] skge: handle zero address at open Jeff Garzik
2007-02-02 16:22 ` [PATCH 2/4] skge: use dev_printk Stephen Hemminger
2007-02-02 16:22 ` [PATCH 3/4] skge: WOL support Stephen Hemminger
2007-02-05 13:25   ` Ingo Oeser
2007-02-02 16:22 ` [PATCH 4/4] skge: version 1.10 Stephen Hemminger

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=20070202162419.046994000@linux-foundation.org \
    --to=shemminger@linux-foundation.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).