lkml.org 
[lkml]   [2013]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH RFCv2 4/6] net: phy: resume/suspend PHYs on attach/detach
    Date
    This ensures PHYs are resumed on attach and suspended on detach.

    Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
    ---
    Changelog:
    RFCv1->RFCv2:
    - none

    Cc: David Miller <davem@davemloft.net>
    Cc: Florian Fainelli <f.fainelli@gmail.com>
    Cc: Mugunthan V N <mugunthanvnm@ti.com>
    Cc: netdev@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.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


    \
     
     \ /
      Last update: 2013-12-04 20:41    [W:4.037 / U:0.220 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site