summaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-06-06 19:11:14 +0200
committerJeff Garzik <jeff@garzik.org>2006-06-08 21:44:54 +0200
commit631ae320a4123898927ab1eb32ad81274a713488 (patch)
tree81c3e089f06a17efbc9f075bc8a875406492c9e2 /drivers/net/skge.c
parent[PATCH] skge: transmit complete via IRQ not NAPI (diff)
downloadlinux-631ae320a4123898927ab1eb32ad81274a713488.tar.xz
linux-631ae320a4123898927ab1eb32ad81274a713488.zip
[PATCH] skge: dont allow bad hardware address from ROM
Sometimes boards don't reset properly, and the address read out of the EEPROM is zero. Stop the insanity before the device gets registered. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r--drivers/net/skge.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index f377c259a398..5044f45023a4 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3362,6 +3362,14 @@ static int __devinit skge_probe(struct pci_dev *pdev,
if ((dev = skge_devinit(hw, 0, using_dac)) == NULL)
goto err_out_led_off;
+ if (!is_valid_ether_addr(dev->dev_addr)) {
+ printk(KERN_ERR PFX "%s: bad (zero?) ethernet address in rom\n",
+ pci_name(pdev));
+ err = -EIO;
+ goto err_out_free_netdev;
+ }
+
+
err = register_netdev(dev);
if (err) {
printk(KERN_ERR PFX "%s: cannot register net device\n",