diff options
-rw-r--r-- | drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 964e9c0948bc..3ead111111e1 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | |||
@@ -1745,6 +1745,12 @@ int pch_gbe_up(struct pch_gbe_adapter *adapter) | |||
1745 | struct pch_gbe_rx_ring *rx_ring = adapter->rx_ring; | 1745 | struct pch_gbe_rx_ring *rx_ring = adapter->rx_ring; |
1746 | int err; | 1746 | int err; |
1747 | 1747 | ||
1748 | /* Ensure we have a valid MAC */ | ||
1749 | if (!is_valid_ether_addr(adapter->hw.mac.addr)) { | ||
1750 | pr_err("Error: Invalid MAC address\n"); | ||
1751 | return -EINVAL; | ||
1752 | } | ||
1753 | |||
1748 | /* hardware has been reset, we need to reload some things */ | 1754 | /* hardware has been reset, we need to reload some things */ |
1749 | pch_gbe_set_multi(netdev); | 1755 | pch_gbe_set_multi(netdev); |
1750 | 1756 | ||
@@ -2468,9 +2474,14 @@ static int pch_gbe_probe(struct pci_dev *pdev, | |||
2468 | 2474 | ||
2469 | memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len); | 2475 | memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len); |
2470 | if (!is_valid_ether_addr(netdev->dev_addr)) { | 2476 | if (!is_valid_ether_addr(netdev->dev_addr)) { |
2471 | dev_err(&pdev->dev, "Invalid MAC Address\n"); | 2477 | /* |
2472 | ret = -EIO; | 2478 | * If the MAC is invalid (or just missing), display a warning |
2473 | goto err_free_adapter; | 2479 | * but do not abort setting up the device. pch_gbe_up will |
2480 | * prevent the interface from being brought up until a valid MAC | ||
2481 | * is set. | ||
2482 | */ | ||
2483 | dev_err(&pdev->dev, "Invalid MAC address, " | ||
2484 | "interface disabled.\n"); | ||
2474 | } | 2485 | } |
2475 | setup_timer(&adapter->watchdog_timer, pch_gbe_watchdog, | 2486 | setup_timer(&adapter->watchdog_timer, pch_gbe_watchdog, |
2476 | (unsigned long)adapter); | 2487 | (unsigned long)adapter); |