static enum xgbe_an xgbe_an73_incompat_link(struct xgbe_prv_data *pdata) { /* Be sure we aren't looping trying to negotiate */ if (xgbe_in_kr_mode(pdata)) { pdata->kr_state = XGBE_RX_ERROR; if (!(pdata->phy.advertising & ADVERTISED_1000baseKX_Full) && !(pdata->phy.advertising & ADVERTISED_2500baseX_Full)) return XGBE_AN_NO_LINK; if (pdata->kx_state != XGBE_RX_BPA) return XGBE_AN_NO_LINK; } else { pdata->kx_state = XGBE_RX_ERROR; if (!(pdata->phy.advertising & ADVERTISED_10000baseKR_Full)) return XGBE_AN_NO_LINK; if (pdata->kr_state != XGBE_RX_BPA) return XGBE_AN_NO_LINK; } xgbe_an73_disable(pdata); xgbe_switch_mode(pdata); xgbe_an73_restart(pdata); return XGBE_AN_INCOMPAT_LINK; }
static void xgbe_set_mode(struct xgbe_prv_data *pdata, enum xgbe_mode mode) { enum xgbe_mode cur_mode; xgbe_cur_mode(pdata, &cur_mode); if (mode != cur_mode) xgbe_switch_mode(pdata); }