diff --git a/[refs] b/[refs] index b5202c99a501..cd40f35dda44 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 26deba501371c215f95624ede81ab5b611fd7d95 +refs/heads/master: 1dfc5ceacd00365a9089e98643f4b26253d5a6aa diff --git a/trunk/drivers/net/sfc/efx.c b/trunk/drivers/net/sfc/efx.c index 4ebad613e6de..155aa1cca366 100644 --- a/trunk/drivers/net/sfc/efx.c +++ b/trunk/drivers/net/sfc/efx.c @@ -737,23 +737,27 @@ static int efx_init_port(struct efx_nic *efx) EFX_LOG(efx, "init port\n"); + mutex_lock(&efx->mac_lock); + rc = efx->phy_op->init(efx); if (rc) - return rc; - mutex_lock(&efx->mac_lock); + goto fail1; efx->phy_op->reconfigure(efx); rc = falcon_switch_mac(efx); - mutex_unlock(&efx->mac_lock); if (rc) - goto fail; + goto fail2; efx->mac_op->reconfigure(efx); efx->port_initialized = true; efx_stats_enable(efx); + + mutex_unlock(&efx->mac_lock); return 0; -fail: +fail2: efx->phy_op->fini(efx); +fail1: + mutex_unlock(&efx->mac_lock); return rc; }