|
@@ -905,10 +905,10 @@ void phy_state_machine(struct work_struct *work)
|
|
|
phydev->adjust_link(phydev->attached_dev);
|
|
|
break;
|
|
|
case PHY_RUNNING:
|
|
|
- /* Only register a CHANGE if we are polling or ignoring
|
|
|
- * interrupts and link changed since latest checking.
|
|
|
+ /* Only register a CHANGE if we are polling and link changed
|
|
|
+ * since latest checking.
|
|
|
*/
|
|
|
- if (!phy_interrupt_is_valid(phydev)) {
|
|
|
+ if (phydev->irq == PHY_POLL) {
|
|
|
old_link = phydev->link;
|
|
|
err = phy_read_status(phydev);
|
|
|
if (err)
|
|
@@ -1000,8 +1000,13 @@ void phy_state_machine(struct work_struct *work)
|
|
|
phy_state_to_str(old_state),
|
|
|
phy_state_to_str(phydev->state));
|
|
|
|
|
|
- queue_delayed_work(system_power_efficient_wq, &phydev->state_queue,
|
|
|
- PHY_STATE_TIME * HZ);
|
|
|
+ /* Only re-schedule a PHY state machine change if we are polling the
|
|
|
+ * PHY, if PHY_IGNORE_INTERRUPT is set, then we will be moving
|
|
|
+ * between states from phy_mac_interrupt()
|
|
|
+ */
|
|
|
+ if (phydev->irq == PHY_POLL)
|
|
|
+ queue_delayed_work(system_power_efficient_wq, &phydev->state_queue,
|
|
|
+ PHY_STATE_TIME * HZ);
|
|
|
}
|
|
|
|
|
|
void phy_mac_interrupt(struct phy_device *phydev, int new_link)
|