Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gianfar: Fix Wake-on-LAN support

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>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Anton Vorontsov and committed by
David S. Miller
e5664bb2 f307dbd8

+2
+2
drivers/net/gianfar_mii.c
··· 234 234 if (NULL == new_bus) 235 235 return -ENOMEM; 236 236 237 + device_init_wakeup(&ofdev->dev, 1); 238 + 237 239 new_bus->name = "Gianfar MII Bus", 238 240 new_bus->read = &gfar_mdio_read, 239 241 new_bus->write = &gfar_mdio_write,