73 for (count = 0; count < 1000; count++) {
83 "timed out waiting for XAUI/XGXS reset\n");
87 static void falcon_ack_status_intr(
struct efx_nic *efx)
107 static bool falcon_xgxs_link_ok(
struct efx_nic *efx)
110 bool align_done, link_ok =
false;
130 static bool falcon_xmac_link_ok(
struct efx_nic *efx)
139 falcon_xgxs_link_ok(efx)) &&
142 efx_mdio_phyxgxs_lane_sync(efx));
145 static void falcon_reconfigure_xmac_core(
struct efx_nic *efx)
154 FRF_AB_XM_RX_JUMBO_MODE, 1,
155 FRF_AB_XM_TX_STAT_EN, 1,
156 FRF_AB_XM_RX_STAT_EN, 1);
162 FRF_AB_XM_TX_PRMBL, 1,
163 FRF_AB_XM_AUTO_PAD, 1,
165 FRF_AB_XM_FCNTL, tx_fc,
172 FRF_AB_XM_AUTO_DEPAD, 0,
173 FRF_AB_XM_ACPT_ALL_MCAST, 1,
175 FRF_AB_XM_PASS_CRC_ERR, 1);
183 FRF_AB_XM_MAX_TX_FRM_SIZE, max_frame_len,
184 FRF_AB_XM_TX_JUMBO_MODE, 1);
188 FRF_AB_XM_PAUSE_TIME, 0xfffe,
189 FRF_AB_XM_DIS_FCNTL, !rx_fc);
199 static void falcon_reconfigure_xgxs_core(
struct efx_nic *efx)
209 bool old_xgmii_loopback, old_xgxs_loopback, old_xaui_loopback;
221 reset_xgxs = ((xgxs_loopback != old_xgxs_loopback) ||
222 (xaui_loopback != old_xaui_loopback) ||
223 (xgmii_loopback != old_xgmii_loopback));
231 (xgxs_loopback || xaui_loopback) ?
247 static bool falcon_xmac_link_ok_retry(
struct efx_nic *efx,
int tries)
249 bool mac_up = falcon_xmac_link_ok(efx);
252 efx_phy_mode_disabled(efx->
phy_mode))
258 while (!mac_up && tries) {
263 mac_up = falcon_xmac_link_ok(efx);
274 return !falcon_xmac_link_ok_retry(efx, 5);
281 falcon_reconfigure_xgxs_core(efx);
282 falcon_reconfigure_xmac_core(efx);
287 falcon_ack_status_intr(efx);
361 falcon_ack_status_intr(efx);