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>
This commit is contained in:
parent
541cd3ee00
commit
2f5cb43406
3 changed files with 59 additions and 22 deletions
|
@ -447,6 +447,7 @@ struct phy_device* get_phy_device(struct mii_bus *bus, int addr);
|
|||
int phy_device_register(struct phy_device *phy);
|
||||
int phy_clear_interrupt(struct phy_device *phydev);
|
||||
int phy_config_interrupt(struct phy_device *phydev, u32 interrupts);
|
||||
int phy_init_hw(struct phy_device *phydev);
|
||||
int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
|
||||
u32 flags, phy_interface_t interface);
|
||||
struct phy_device * phy_attach(struct net_device *dev,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue