From 7236d2bfe0acc48330e3c2a3dfac4ada9a792cd8 Mon Sep 17 00:00:00 2001 From: Andy Moreton Date: Sat, 27 May 2017 08:55:30 +0100 Subject: [PATCH] net/sfc/base: fix error code usage in common code 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 Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/ef10_rx.c | 2 +- drivers/net/sfc/base/ef10_tx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/sfc/base/ef10_rx.c b/drivers/net/sfc/base/ef10_rx.c index b65faeddd5..9d6756c342 100644 --- a/drivers/net/sfc/base/ef10_rx.c +++ b/drivers/net/sfc/base/ef10_rx.c @@ -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; } diff --git a/drivers/net/sfc/base/ef10_tx.c b/drivers/net/sfc/base/ef10_tx.c index 0f8e9b1ba1..dfa9e0bf81 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) && (req.emr_rc != EALREADY)) { rc = req.emr_rc; goto fail1; } -- 2.20.1