Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289791
b: refs/heads/master
c: e332bcb
h: refs/heads/master
i:
  289789: 77b6211
  289787: 5453eb2
  289783: 25e5fd6
  289775: 5f19990
  289759: 0251985
  289727: 4290d70
  289663: bc9c1a2
  289535: e97f628
  289279: b741f5f
  288767: 8bd0fe7
v: v3
  • Loading branch information
Ben Hutchings committed Jan 27, 2012
1 parent 240b92f commit 4d43e99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 31 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: cdb08f8fd8642a6d661c920f565e85cf87a0c9be
refs/heads/master: e332bcb3d149644c344ee5fdf1f6e4ac39e9d9a3
32 changes: 2 additions & 30 deletions trunk/drivers/net/ethernet/sfc/efx.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,6 @@ static int napi_weight = 64;
*/
static unsigned int efx_monitor_interval = 1 * HZ;

/* This controls whether or not the driver will initialise devices
* with invalid MAC addresses stored in the EEPROM or flash. If true,
* such devices will be initialised with a random locally-generated
* MAC address. This allows for loading the sfc_mtd driver to
* reprogram the flash, even if the flash contents (including the MAC
* address) have previously been erased.
*/
static unsigned int allow_bad_hwaddr;

/* Initial interrupt moderation settings. They can be modified after
* module load with ethtool.
*
Expand Down Expand Up @@ -916,7 +907,6 @@ static void efx_mac_work(struct work_struct *data)

static int efx_probe_port(struct efx_nic *efx)
{
unsigned char *perm_addr;
int rc;

netif_dbg(efx, probe, efx->net_dev, "create port\n");
Expand All @@ -929,28 +919,10 @@ static int efx_probe_port(struct efx_nic *efx)
if (rc)
return rc;

/* Sanity check MAC address */
perm_addr = efx->net_dev->perm_addr;
if (is_valid_ether_addr(perm_addr)) {
memcpy(efx->net_dev->dev_addr, perm_addr, ETH_ALEN);
} else {
netif_err(efx, probe, efx->net_dev, "invalid MAC address %pM\n",
perm_addr);
if (!allow_bad_hwaddr) {
rc = -EINVAL;
goto err;
}
random_ether_addr(efx->net_dev->dev_addr);
netif_info(efx, probe, efx->net_dev,
"using locally-generated MAC %pM\n",
efx->net_dev->dev_addr);
}
/* Initialise MAC address to permanent address */
memcpy(efx->net_dev->dev_addr, efx->net_dev->perm_addr, ETH_ALEN);

return 0;

err:
efx->type->remove_port(efx);
return rc;
}

static int efx_init_port(struct efx_nic *efx)
Expand Down

0 comments on commit 4d43e99

Please sign in to comment.