mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-11 12:44:49 -04:00
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: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
340a6f3d2d
commit
472115d983
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user