|
@@ -908,6 +908,11 @@ void phy_start(struct phy_device *phydev)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(phy_start);
|
|
EXPORT_SYMBOL(phy_start);
|
|
|
|
|
|
|
|
+static void phy_adjust_link(struct phy_device *phydev)
|
|
|
|
+{
|
|
|
|
+ phydev->adjust_link(phydev->attached_dev);
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* phy_state_machine - Handle the state machine
|
|
* phy_state_machine - Handle the state machine
|
|
* @work: work_struct that describes the work to be done
|
|
* @work: work_struct that describes the work to be done
|
|
@@ -950,7 +955,7 @@ void phy_state_machine(struct work_struct *work)
|
|
if (!phydev->link) {
|
|
if (!phydev->link) {
|
|
phydev->state = PHY_NOLINK;
|
|
phydev->state = PHY_NOLINK;
|
|
netif_carrier_off(phydev->attached_dev);
|
|
netif_carrier_off(phydev->attached_dev);
|
|
- phydev->adjust_link(phydev->attached_dev);
|
|
|
|
|
|
+ phy_adjust_link(phydev);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -963,7 +968,7 @@ void phy_state_machine(struct work_struct *work)
|
|
if (err > 0) {
|
|
if (err > 0) {
|
|
phydev->state = PHY_RUNNING;
|
|
phydev->state = PHY_RUNNING;
|
|
netif_carrier_on(phydev->attached_dev);
|
|
netif_carrier_on(phydev->attached_dev);
|
|
- phydev->adjust_link(phydev->attached_dev);
|
|
|
|
|
|
+ phy_adjust_link(phydev);
|
|
|
|
|
|
} else if (0 == phydev->link_timeout--)
|
|
} else if (0 == phydev->link_timeout--)
|
|
needs_aneg = true;
|
|
needs_aneg = true;
|
|
@@ -990,7 +995,7 @@ void phy_state_machine(struct work_struct *work)
|
|
}
|
|
}
|
|
phydev->state = PHY_RUNNING;
|
|
phydev->state = PHY_RUNNING;
|
|
netif_carrier_on(phydev->attached_dev);
|
|
netif_carrier_on(phydev->attached_dev);
|
|
- phydev->adjust_link(phydev->attached_dev);
|
|
|
|
|
|
+ phy_adjust_link(phydev);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case PHY_FORCING:
|
|
case PHY_FORCING:
|
|
@@ -1006,7 +1011,7 @@ void phy_state_machine(struct work_struct *work)
|
|
needs_aneg = true;
|
|
needs_aneg = true;
|
|
}
|
|
}
|
|
|
|
|
|
- phydev->adjust_link(phydev->attached_dev);
|
|
|
|
|
|
+ phy_adjust_link(phydev);
|
|
break;
|
|
break;
|
|
case PHY_RUNNING:
|
|
case PHY_RUNNING:
|
|
/* Only register a CHANGE if we are polling and link changed
|
|
/* Only register a CHANGE if we are polling and link changed
|
|
@@ -1035,7 +1040,7 @@ void phy_state_machine(struct work_struct *work)
|
|
netif_carrier_off(phydev->attached_dev);
|
|
netif_carrier_off(phydev->attached_dev);
|
|
}
|
|
}
|
|
|
|
|
|
- phydev->adjust_link(phydev->attached_dev);
|
|
|
|
|
|
+ phy_adjust_link(phydev);
|
|
|
|
|
|
if (phy_interrupt_is_valid(phydev))
|
|
if (phy_interrupt_is_valid(phydev))
|
|
err = phy_config_interrupt(phydev,
|
|
err = phy_config_interrupt(phydev,
|
|
@@ -1045,7 +1050,7 @@ void phy_state_machine(struct work_struct *work)
|
|
if (phydev->link) {
|
|
if (phydev->link) {
|
|
phydev->link = 0;
|
|
phydev->link = 0;
|
|
netif_carrier_off(phydev->attached_dev);
|
|
netif_carrier_off(phydev->attached_dev);
|
|
- phydev->adjust_link(phydev->attached_dev);
|
|
|
|
|
|
+ phy_adjust_link(phydev);
|
|
do_suspend = true;
|
|
do_suspend = true;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
@@ -1069,7 +1074,7 @@ void phy_state_machine(struct work_struct *work)
|
|
} else {
|
|
} else {
|
|
phydev->state = PHY_NOLINK;
|
|
phydev->state = PHY_NOLINK;
|
|
}
|
|
}
|
|
- phydev->adjust_link(phydev->attached_dev);
|
|
|
|
|
|
+ phy_adjust_link(phydev);
|
|
} else {
|
|
} else {
|
|
phydev->state = PHY_AN;
|
|
phydev->state = PHY_AN;
|
|
phydev->link_timeout = PHY_AN_TIMEOUT;
|
|
phydev->link_timeout = PHY_AN_TIMEOUT;
|
|
@@ -1085,7 +1090,7 @@ void phy_state_machine(struct work_struct *work)
|
|
} else {
|
|
} else {
|
|
phydev->state = PHY_NOLINK;
|
|
phydev->state = PHY_NOLINK;
|
|
}
|
|
}
|
|
- phydev->adjust_link(phydev->attached_dev);
|
|
|
|
|
|
+ phy_adjust_link(phydev);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|