mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 13:22:57 +00: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:
parent
340a6f3d2d
commit
472115d983
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue