Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286663
b: refs/heads/master
c: 2b53d07
h: refs/heads/master
i:
  286661: ceeafe8
  286659: b9a38aa
  286655: f56ccf5
v: v3
  • Loading branch information
Darren Hart authored and David S. Miller committed Jan 18, 2012
1 parent f741bc8 commit e831e57
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 013d97e9da1877f1334aa8ff3a19921ebbfe99b5
refs/heads/master: 2b53d07891630dead46d65c8f896955fd3ae0302
17 changes: 14 additions & 3 deletions trunk/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1745,6 +1745,12 @@ int pch_gbe_up(struct pch_gbe_adapter *adapter)
struct pch_gbe_rx_ring *rx_ring = adapter->rx_ring;
int err;

/* Ensure we have a valid MAC */
if (!is_valid_ether_addr(adapter->hw.mac.addr)) {
pr_err("Error: Invalid MAC address\n");
return -EINVAL;
}

/* hardware has been reset, we need to reload some things */
pch_gbe_set_multi(netdev);

Expand Down Expand Up @@ -2468,9 +2474,14 @@ static int pch_gbe_probe(struct pci_dev *pdev,

memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len);
if (!is_valid_ether_addr(netdev->dev_addr)) {
dev_err(&pdev->dev, "Invalid MAC Address\n");
ret = -EIO;
goto err_free_adapter;
/*
* If the MAC is invalid (or just missing), display a warning
* but do not abort setting up the device. pch_gbe_up will
* prevent the interface from being brought up until a valid MAC
* is set.
*/
dev_err(&pdev->dev, "Invalid MAC address, "
"interface disabled.\n");
}
setup_timer(&adapter->watchdog_timer, pch_gbe_watchdog,
(unsigned long)adapter);
Expand Down

0 comments on commit e831e57

Please sign in to comment.