lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 27 Jan 2015 02:42:26 +0000
From:	"fugang.duan@...escale.com" <fugang.duan@...escale.com>
To:	Florian Fainelli <f.fainelli@...il.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:	"davem@...emloft.net" <davem@...emloft.net>,
	"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>
Subject: RE: [PATCH net-next 1/4] net: phy: utilize phy_suspend and phy_resume

From: Florian Fainelli <f.fainelli@...il.com> Sent: Tuesday, January 27, 2015 8:31 AM
> To: netdev@...r.kernel.org
> Cc: davem@...emloft.net; s.hauer@...gutronix.de; Duan Fugang-B38611;
> Florian Fainelli
> Subject: [PATCH net-next 1/4] net: phy: utilize phy_suspend and
> phy_resume
> 
> phy_suspend and phy_resume are an abstraction on top of the PHY device
> driver suspend and resume callbacks, utilize those since they are the
> proper interface to suspending and resuming a PHY device.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
>  drivers/net/phy/mdio_bus.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index 50051f271b10..20447741893a 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -465,7 +465,6 @@ static bool mdio_bus_phy_may_suspend(struct
> phy_device *phydev)
> 
>  static int mdio_bus_suspend(struct device *dev)  {
> -	struct phy_driver *phydrv = to_phy_driver(dev->driver);
>  	struct phy_device *phydev = to_phy_device(dev);
> 
>  	/* We must stop the state machine manually, otherwise it stops out
> of @@ -479,19 +478,18 @@ static int mdio_bus_suspend(struct device *dev)
>  	if (!mdio_bus_phy_may_suspend(phydev))
>  		return 0;
> 
> -	return phydrv->suspend(phydev);
> +	return phy_suspend(phydev);
>  }
> 
>  static int mdio_bus_resume(struct device *dev)  {
> -	struct phy_driver *phydrv = to_phy_driver(dev->driver);
>  	struct phy_device *phydev = to_phy_device(dev);
>  	int ret;
> 
>  	if (!mdio_bus_phy_may_suspend(phydev))
>  		goto no_resume;
> 
> -	ret = phydrv->resume(phydev);
> +	ret = phy_resume(phydev);
>  	if (ret < 0)
>  		return ret;
> 
> --
> 2.1.0

Test on i.MX6q sabresd board, works fine.

Acked-by: Fugang Duan <B38611@...escale.com>
Tested-by: Fugang Duan <B38611@...escale.com>
--
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