Re: [PATCH net-next 1/3] net: phylink: unwind the PHY binding when bringup fails late
Andrew Lunn <[email protected]>
| Newsgroups | org.kernel.vger.netdev,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
> + if (ret) {
> + mutex_lock(&pl->phydev_mutex);
> + mutex_lock(&phy->lock);
> + mutex_lock(&pl->state_mutex);
> + pl->phydev = NULL;
> + pl->phy_enable_tx_lpi = false;
> + pl->mac_tx_clk_stop = false;
> + mutex_unlock(&pl->state_mutex);
> + mutex_unlock(&phy->lock);
> + mutex_unlock(&pl->phydev_mutex);
> + }
This is the same as the inner part of phylink_disconnect_phy(). Maybe
pull it out into a helper?
Andrew