Commit 472115d9 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller
Browse files

net: phy: stop PHY if needed when entering phy_disconnect



Stop PHY if needed when entering phy_disconnect. This allows drivers
that don't need a separate call to phy_stop() to omit this call.

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 340a6f3d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -999,6 +999,9 @@ EXPORT_SYMBOL(phy_connect);
 */
void phy_disconnect(struct phy_device *phydev)
{
	if (phy_is_started(phydev))
		phy_stop(phydev);

	if (phydev->irq > 0)
		phy_stop_interrupts(phydev);