Skip to content

Commit

Permalink
sfc: Wait for MC reboot to complete before scheduling driver reset
Browse files Browse the repository at this point in the history
Scheduling a reset following an MC reboot event before waiting for
reboot to complete results in a race that can lead to a state where
must_realloc_vis is false in efx_ef10_fini_dmaq() but the VIs have
been destroyed during the MC reboot.

To avoid MC errors when trying to remove VIs that do not exist, wait
for the MC reboot to complete before scheduling the reset.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
  • Loading branch information
Daniel Pieczko authored and Ben Hutchings committed Sep 20, 2013
1 parent dcb30e6 commit dfdaa95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/sfc/mcdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,16 +800,16 @@ static void efx_mcdi_ev_death(struct efx_nic *efx, int rc)
} else {
int count;

/* Nobody was waiting for an MCDI request, so trigger a reset */
efx_schedule_reset(efx, RESET_TYPE_MC_FAILURE);

/* Consume the status word since efx_mcdi_rpc_finish() won't */
for (count = 0; count < MCDI_STATUS_DELAY_COUNT; ++count) {
if (efx_mcdi_poll_reboot(efx))
break;
udelay(MCDI_STATUS_DELAY_US);
}
mcdi->new_epoch = true;

/* Nobody was waiting for an MCDI request, so trigger a reset */
efx_schedule_reset(efx, RESET_TYPE_MC_FAILURE);
}

spin_unlock(&mcdi->iface_lock);
Expand Down

0 comments on commit dfdaa95

Please sign in to comment.