{
axgbe_an73_set(pdata, false, false);
axgbe_an73_disable_interrupts(pdata);
+ pdata->an_start = 0;
}
static void axgbe_an_restart(struct axgbe_port *pdata)
{
+ if (pdata->phy_if.phy_impl.an_pre)
+ pdata->phy_if.phy_impl.an_pre(pdata);
+
switch (pdata->an_mode) {
case AXGBE_AN_MODE_CL73:
case AXGBE_AN_MODE_CL73_REDRV:
static void axgbe_an_disable(struct axgbe_port *pdata)
{
+ if (pdata->phy_if.phy_impl.an_post)
+ pdata->phy_if.phy_impl.an_post(pdata);
+
switch (pdata->an_mode) {
case AXGBE_AN_MODE_CL73:
case AXGBE_AN_MODE_CL73_REDRV:
return AXGBE_AN_NO_LINK;
}
- axgbe_an73_disable(pdata);
+ axgbe_an_disable(pdata);
axgbe_switch_mode(pdata);
- axgbe_an73_restart(pdata);
+ axgbe_an_restart(pdata);
return AXGBE_AN_INCOMPAT_LINK;
}
pdata->kr_state = AXGBE_RX_BPA;
pdata->kx_state = AXGBE_RX_BPA;
pdata->an_start = 0;
+ if (pdata->phy_if.phy_impl.an_post)
+ pdata->phy_if.phy_impl.an_post(pdata);
}
if (cur_state != pdata->an_state)
static void axgbe_phy_adjust_link(struct axgbe_port *pdata)
{
if (pdata->phy.link) {
+ /* Flow control support */
+ pdata->pause_autoneg = pdata->phy.pause_autoneg;
+
+ if (pdata->tx_pause != (unsigned int)pdata->phy.tx_pause) {
+ pdata->hw_if.config_tx_flow_control(pdata);
+ pdata->tx_pause = pdata->phy.tx_pause;
+ }
+
+ if (pdata->rx_pause != (unsigned int)pdata->phy.rx_pause) {
+ pdata->hw_if.config_rx_flow_control(pdata);
+ pdata->rx_pause = pdata->phy.rx_pause;
+ }
+
/* Speed support */
if (pdata->phy_speed != pdata->phy.speed)
pdata->phy_speed = pdata->phy.speed;