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

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
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment