/* Periodic callback: this exists mainly to poll link status as we * don't use LASI interrupts */ static bool txc43128_phy_poll(struct efx_nic *efx) { struct txc43128_data *data = efx->phy_data; bool was_up = efx->link_state.up; efx->link_state.up = txc43128_phy_read_link(efx); efx->link_state.speed = 10000; efx->link_state.fd = true; efx->link_state.fc = efx->wanted_fc; if (efx->link_state.up || (efx->loopback_mode != LOOPBACK_NONE)) { data->bug10934_timer = jiffies; } else { if (time_after_eq(jiffies, (data->bug10934_timer + BUG10934_RESET_INTERVAL))) { data->bug10934_timer = jiffies; txc_reset_logic(efx); } } return efx->link_state.up != was_up; }
/* Periodic callback: this exists mainly to poll link status as we currently * don't use LASI interrupts. Also update the BER counters and poll the lm87 */ static bool txc43128_phy_poll(struct efx_nic *efx) { struct txc43128_data *data = efx->phy_data; bool was_up = efx->link_state.up; efx->link_state.up = txc43128_phy_read_link(efx); efx->link_state.speed = 10000; efx->link_state.fd = true; efx->link_state.fc = efx->wanted_fc; if (EFX_WORKAROUND_10934(efx)) { if (efx->link_state.up || (efx->loopback_mode != LOOPBACK_NONE)) data->bug10934_timer = jiffies; else { int delta = jiffies - data->bug10934_timer; if (delta >= BUG10934_RESET_INTERVAL) { data->bug10934_timer = jiffies; txc_reset_logic(efx); } } } return efx->link_state.up != was_up; }