netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gianfar: Fix Wake-on-LAN support
@ 2009-01-28 20:35 Anton Vorontsov
  0 siblings, 0 replies; 3+ messages in thread
From: Anton Vorontsov @ 2009-01-28 20:35 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: David Miller, Andy Fleming, Giuseppe Cavallaro, netdev,
	linuxppc-dev

commit 0f0ca340e57bd7446855fefd07a64249acf81223 ("phy: power
management support") caused a regression in the gianfar driver.

Now phylib turns off PHY power during suspend, and thus WOL
doesn't work anymore.

This patch workarounds the issue by enabling wakeup in the MDIO
device, i.e. just restores the old behaviour for the gianfar
driver. Note that this way all PHYs on a given MDIO bus won't
be turned off during suspend, which isn't good from the power
saving point of view.

A proper, per netdevice wakeup management support will need
a bit reworked phylib suspend/resume logic.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/net/gianfar_mii.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index f3706e4..f49a426 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -234,6 +234,8 @@ static int gfar_mdio_probe(struct of_device *ofdev,
 	if (NULL == new_bus)
 		return -ENOMEM;
 
+	device_init_wakeup(&ofdev->dev, 1);
+
 	new_bus->name = "Gianfar MII Bus",
 	new_bus->read = &gfar_mdio_read,
 	new_bus->write = &gfar_mdio_write,
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] gianfar: Fix Wake-on-LAN support
@ 2009-01-28 20:35 Anton Vorontsov
  0 siblings, 0 replies; 3+ messages in thread
From: Anton Vorontsov @ 2009-01-28 20:35 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: linuxppc-dev, Giuseppe Cavallaro, Andy Fleming, David Miller,
	netdev

commit 0f0ca340e57bd7446855fefd07a64249acf81223 ("phy: power
management support") caused a regression in the gianfar driver.

Now phylib turns off PHY power during suspend, and thus WOL
doesn't work anymore.

This patch workarounds the issue by enabling wakeup in the MDIO
device, i.e. just restores the old behaviour for the gianfar
driver. Note that this way all PHYs on a given MDIO bus won't
be turned off during suspend, which isn't good from the power
saving point of view.

A proper, per netdevice wakeup management support will need
a bit reworked phylib suspend/resume logic.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/net/gianfar_mii.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index f3706e4..f49a426 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -234,6 +234,8 @@ static int gfar_mdio_probe(struct of_device *ofdev,
 	if (NULL == new_bus)
 		return -ENOMEM;
 
+	device_init_wakeup(&ofdev->dev, 1);
+
 	new_bus->name = "Gianfar MII Bus",
 	new_bus->read = &gfar_mdio_read,
 	new_bus->write = &gfar_mdio_write,
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gianfar: Fix Wake-on-LAN support
       [not found] <20090128203545.GA13928@oksana.dev.rtsoft.ru>
@ 2009-01-30  1:31 ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-01-30  1:31 UTC (permalink / raw)
  To: avorontsov; +Cc: jgarzik, afleming, peppe.cavallaro, netdev, linuxppc-dev

From: Anton Vorontsov <avorontsov@ru.mvista.com>
Date: Wed, 28 Jan 2009 23:35:45 +0300

> commit 0f0ca340e57bd7446855fefd07a64249acf81223 ("phy: power
> management support") caused a regression in the gianfar driver.
> 
> Now phylib turns off PHY power during suspend, and thus WOL
> doesn't work anymore.
> 
> This patch workarounds the issue by enabling wakeup in the MDIO
> device, i.e. just restores the old behaviour for the gianfar
> driver. Note that this way all PHYs on a given MDIO bus won't
> be turned off during suspend, which isn't good from the power
> saving point of view.
> 
> A proper, per netdevice wakeup management support will need
> a bit reworked phylib suspend/resume logic.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Applied, thanks Anton.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-30  1:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20090128203545.GA13928@oksana.dev.rtsoft.ru>
2009-01-30  1:31 ` [PATCH] gianfar: Fix Wake-on-LAN support David Miller
2009-01-28 20:35 Anton Vorontsov
  -- strict thread matches above, loose matches on Subject: below --
2009-01-28 20:35 Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).