From 4d43e994fe92233a4b03ecb39a4c3f0544f97f83 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 20 Dec 2011 01:22:51 +0000 Subject: [PATCH] --- yaml --- r: 289791 b: refs/heads/master c: e332bcb3d149644c344ee5fdf1f6e4ac39e9d9a3 h: refs/heads/master i: 289789: 77b6211e33337339fff89be4ff88c6b9347f1597 289787: 5453eb225f406859b95d0daa29f2f529562fafd1 289783: 25e5fd6973a1124dc16d73525131a30e9797aa89 289775: 5f19990d18da21a1d137e13f4e35ee1a88a6270b 289759: 025198540186b79109aa3d759833fd3488638d14 289727: 4290d70996c425da860f6c3b9c328a3f9dd495d3 289663: bc9c1a20c1363a1fd587b9c4dfb583b244134c2d 289535: e97f628203cb8cc611e513f17fa969002b8fb0c3 289279: b741f5fceea6adad9661f4ec626bebbc5461a346 288767: 8bd0fe749c98e67ee4150b6eaf3b66f361413ec0 v: v3 --- [refs] | 2 +- trunk/drivers/net/ethernet/sfc/efx.c | 32 ++-------------------------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/[refs] b/[refs] index 53a9a422131c..34623b6b7645 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cdb08f8fd8642a6d661c920f565e85cf87a0c9be +refs/heads/master: e332bcb3d149644c344ee5fdf1f6e4ac39e9d9a3 diff --git a/trunk/drivers/net/ethernet/sfc/efx.c b/trunk/drivers/net/ethernet/sfc/efx.c index d7301d2e81a7..eff5d300aa0a 100644 --- a/trunk/drivers/net/ethernet/sfc/efx.c +++ b/trunk/drivers/net/ethernet/sfc/efx.c @@ -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. * @@ -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"); @@ -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)