net/sfc/base: fix error code usage in common code
authorAndy Moreton <amoreton@solarflare.com>
Sat, 27 May 2017 07:55:30 +0000 (08:55 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 12 Jun 2017 09:41:27 +0000 (10:41 +0100)
MCDI results returned in req.emr_rc have already been translated
from MC_CMD_ERR_* to errno names, so using an MC_CMD_ERR_* value
is incorrect.

Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
Cc: stable@dpdk.org
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/base/ef10_rx.c
drivers/net/sfc/base/ef10_tx.c

index b65faed..9d6756c 100644 (file)
@@ -137,7 +137,7 @@ efx_mcdi_fini_rxq(
 
        efx_mcdi_execute_quiet(enp, &req);
 
-       if ((req.emr_rc != 0) && (req.emr_rc != MC_CMD_ERR_EALREADY)) {
+       if ((req.emr_rc != 0) && (req.emr_rc != EALREADY)) {
                rc = req.emr_rc;
                goto fail1;
        }
index 0f8e9b1..dfa9e0b 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) && (req.emr_rc != EALREADY)) {
                rc = req.emr_rc;
                goto fail1;
        }