New upstream version 17.05.1
[deb_dpdk.git] / drivers / net / sfc / base / ef10_tx.c
index 0f8e9b1..211d265 100644 (file)
@@ -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);
 }