phy_sanitize_settings(phydev);
err = phydev->drv->config_aneg(phydev);
-
if (err < 0)
goto out_unlock;
}
EXPORT_SYMBOL(phy_start_aneg);
-
/**
* phy_start_machine - start PHY state machine tracking
* @phydev: the phy_device struct
/* Disable PHY interrupts */
err = phy_config_interrupt(phydev, PHY_INTERRUPT_DISABLED);
-
if (err)
goto phy_err;
/* Clear the interrupt */
err = phy_clear_interrupt(phydev);
-
if (err)
goto phy_err;
}
EXPORT_SYMBOL(phy_stop_interrupts);
-
/**
* phy_change - Scheduled by the phy_interrupt/timer to handle PHY changes
* @work: work_struct that describes the work to be done
/* reschedule state queue work to run as soon as possible */
cancel_delayed_work_sync(&phydev->state_queue);
queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, 0);
-
return;
ignore:
}
EXPORT_SYMBOL(phy_stop);
-
/**
* phy_start - start or restart a PHY device
* @phydev: target phy_device struct
break;
case PHY_AN:
err = phy_read_status(phydev);
-
if (err < 0)
break;
break;
case PHY_NOLINK:
err = phy_read_status(phydev);
-
if (err)
break;
break;
case PHY_FORCING:
err = genphy_update_link(phydev);
-
if (err)
break;
break;
case PHY_CHANGELINK:
err = phy_read_status(phydev);
-
if (err)
break;
}
break;
case PHY_RESUMING:
-
err = phy_clear_interrupt(phydev);
-
if (err)
break;
err = phy_config_interrupt(phydev, PHY_INTERRUPT_ENABLED);
-
if (err)
break;