1 --- a/drivers/net/phy/phy.c
2 +++ b/drivers/net/phy/phy.c
3 @@ -690,7 +690,7 @@ void phy_state_machine(struct work_struc
4 struct delayed_work *dwork = to_delayed_work(work);
5 struct phy_device *phydev =
6 container_of(dwork, struct phy_device, state_queue);
7 - int needs_aneg = 0, do_suspend = 0;
8 + bool needs_aneg = false, do_suspend = false, do_resume = false;
11 mutex_lock(&phydev->lock);
12 @@ -702,7 +702,7 @@ void phy_state_machine(struct work_struc
19 phydev->link_timeout = PHY_AN_TIMEOUT;
21 @@ -732,7 +732,7 @@ void phy_state_machine(struct work_struc
22 phydev->adjust_link(phydev->attached_dev);
24 } else if (0 == phydev->link_timeout--) {
27 /* If we have the magic_aneg bit, we try again */
28 if (phydev->drv->flags & PHY_HAS_MAGICANEG)
30 @@ -770,7 +770,7 @@ void phy_state_machine(struct work_struc
31 netif_carrier_on(phydev->attached_dev);
33 if (0 == phydev->link_timeout--)
38 phydev->adjust_link(phydev->attached_dev);
39 @@ -806,7 +806,7 @@ void phy_state_machine(struct work_struc
41 netif_carrier_off(phydev->attached_dev);
42 phydev->adjust_link(phydev->attached_dev);
48 @@ -855,6 +855,7 @@ void phy_state_machine(struct work_struc
50 phydev->adjust_link(phydev->attached_dev);
56 @@ -862,9 +863,10 @@ void phy_state_machine(struct work_struc
59 err = phy_start_aneg(phydev);
62 + else if (do_suspend)