[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1386926429-28818-5-git-send-email-sebastian.hesselbarth@gmail.com>
Date: Fri, 13 Dec 2013 10:20:28 +0100
From: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
David Miller <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Mugunthan V N <mugunthanvnm@...com>, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 4/5] net: phy: resume/suspend PHYs on attach/detach
This ensures PHYs are resumed on attach and suspended on detach.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Acked-by: Mugunthan V N <mugunthanvnm@...com>
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
---
Cc: David Miller <davem@...emloft.net>
Cc: Florian Fainelli <f.fainelli@...il.com>
Cc: Mugunthan V N <mugunthanvnm@...com>
Cc: netdev@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org
---
drivers/net/phy/phy_device.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 6f0e9e4..3903f44 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -570,6 +570,8 @@ static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
if (err)
phy_detach(phydev);
+ phy_resume(phydev);
+
return err;
}
@@ -615,6 +617,7 @@ void phy_detach(struct phy_device *phydev)
{
phydev->attached_dev->phydev = NULL;
phydev->attached_dev = NULL;
+ phy_suspend(phydev);
/* If the device had no specific driver before (i.e. - it
* was using the generic driver), we unbind the device
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists