From bf7567fd2a5b0b28ab724046143c24561d38d015 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 3 Jul 2017 15:11:03 +0100 Subject: New upstream version 17.05.1 Change-Id: I8a23679edd6c9c593ceebecf7d2bf1b489e14ccb Signed-off-by: Luca Boccassi --- drivers/net/sfc/base/ef10_tx.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'drivers/net/sfc/base/ef10_tx.c') diff --git a/drivers/net/sfc/base/ef10_tx.c b/drivers/net/sfc/base/ef10_tx.c index 0f8e9b1b..211d2655 100644 --- a/drivers/net/sfc/base/ef10_tx.c +++ b/drivers/net/sfc/base/ef10_tx.c @@ -148,7 +148,7 @@ efx_mcdi_fini_txq( efx_mcdi_execute_quiet(enp, &req); - if ((req.emr_rc != 0) && (req.emr_rc != MC_CMD_ERR_EALREADY)) { + if (req.emr_rc != 0) { rc = req.emr_rc; goto fail1; } @@ -156,7 +156,12 @@ efx_mcdi_fini_txq( return (0); fail1: - EFSYS_PROBE1(fail1, efx_rc_t, rc); + /* + * EALREADY is not an error, but indicates that the MC has rebooted and + * that the TXQ has already been destroyed. + */ + if (rc != EALREADY) + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } @@ -675,7 +680,14 @@ ef10_tx_qflush( return (0); fail1: - EFSYS_PROBE1(fail1, efx_rc_t, rc); + /* + * EALREADY is not an error, but indicates that the MC has rebooted and + * that the TXQ has already been destroyed. Callers need to know that + * the TXQ flush has completed to avoid waiting until timeout for a + * flush done event that will not be delivered. + */ + if (rc != EALREADY) + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } -- cgit 1.2.3-korg