Skip to content

Commit

Permalink
[PATCH] skge: dont allow bad hardware address from ROM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Jun 8, 2006
1 parent 7c442fa commit 631ae32
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/skge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 631ae32

Please sign in to comment.