summaryrefslogtreecommitdiff
path: root/drivers/net/skge.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-02-02 08:22:51 -0800
committerJeff Garzik <jeff@garzik.org>2007-02-06 19:07:44 -0500
commitfae87592280039837fdd72c5ecdac2af2eb97f63 (patch)
tree742628efdd91e394d528ed202ada01bce9e75140 /drivers/net/skge.c
parenta7bed27dc69e3bc9238549a4964ea94ec318362c (diff)
skge: handle zero address at open
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> 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, 5 insertions, 3 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 45283f3f95e4..ce25b6f505c4 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -2373,6 +2373,9 @@ static int skge_up(struct net_device *dev)
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 pci_dev *pdev,
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);