diff options
| author | Mark Brown <[email protected]> | 2015-10-12 18:09:27 +0100 | 
|---|---|---|
| committer | Mark Brown <[email protected]> | 2015-10-12 18:09:27 +0100 | 
| commit | 79828b4fa835f73cdaf4bffa48696abdcbea9d02 (patch) | |
| tree | 5e0fa7156acb75ba603022bc807df8f2fedb97a8 /drivers/net/ethernet/sfc/selftest.c | |
| parent | 721b51fcf91898299d96f4b72cb9434cda29dce6 (diff) | |
| parent | 8c1a9d6323abf0fb1e5dad96cf3f1c783505ea5a (diff) | |
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-fix-rt5645
Diffstat (limited to 'drivers/net/ethernet/sfc/selftest.c')
| -rw-r--r-- | drivers/net/ethernet/sfc/selftest.c | 14 | 
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c index b605dfd5c7bc..9d78830da609 100644 --- a/drivers/net/ethernet/sfc/selftest.c +++ b/drivers/net/ethernet/sfc/selftest.c @@ -114,7 +114,10 @@ static int efx_test_nvram(struct efx_nic *efx, struct efx_self_tests *tests)  	if (efx->type->test_nvram) {  		rc = efx->type->test_nvram(efx); -		tests->nvram = rc ? -1 : 1; +		if (rc == -EPERM) +			rc = 0; +		else +			tests->nvram = rc ? -1 : 1;  	}  	return rc; @@ -253,6 +256,12 @@ static int efx_test_phy(struct efx_nic *efx, struct efx_self_tests *tests,  	mutex_lock(&efx->mac_lock);  	rc = efx->phy_op->run_tests(efx, tests->phy_ext, flags);  	mutex_unlock(&efx->mac_lock); +	if (rc == -EPERM) +		rc = 0; +	else +		netif_info(efx, drv, efx->net_dev, +			   "%s phy selftest\n", rc ? "Failed" : "Passed"); +  	return rc;  } @@ -661,6 +670,9 @@ static int efx_test_loopbacks(struct efx_nic *efx, struct efx_self_tests *tests,  	wmb();  	kfree(state); +	if (rc == -EPERM) +		rc = 0; +  	return rc;  }  |