phylib: Properly reinitialize PHYs after hibernation
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Wed, 30 Dec 2009 08:23:30 +0000 (08:23 +0000)
committerMatt Sealey <neko@excel.(none)>
Tue, 10 Aug 2010 16:50:21 +0000 (11:50 -0500)
commitd78f3d35b30efcb49b2b3e42982c04edc1281389
tree2c2f66bbad5415d73b7f3ae34fe6706d83d6d756
parent347b7f1281e78beb205664817f4a613d6b835237
phylib: Properly reinitialize PHYs after hibernation

Since hibernation assumes power loss, we should fully reinitialize
PHYs (including platform fixups), as if PHYs were just attached.

This patch factors phy_init_hw() out of phy_attach_direct(), then
converts mdio_bus to dev_pm_ops and adds an appropriate restore()
callback.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_bus.c
drivers/net/phy/phy_device.c
include/linux/phy.h