patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/5] net/sfc/base: fix incorrect error code usage in common code
@ 2017-05-27  7:55 Andrew Rybchenko
  2017-05-27  7:55 ` [dpdk-stable] [PATCH 4/5] net/sfc: add Tx queue flush failed flag for sanity Andrew Rybchenko
  2017-05-30 12:08 ` [dpdk-stable] [PATCH 1/5] net/sfc/base: fix incorrect error code usage in common code Ferruh Yigit
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Rybchenko @ 2017-05-27  7:55 UTC (permalink / raw)
  To: dev; +Cc: Andy Moreton, stable

From: Andy Moreton <amoreton@solarflare.com>

MCDI results retuerned 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 | 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 b65faed..9d6756c 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 0f8e9b1..dfa9e0b 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.9.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-30 12:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-27  7:55 [dpdk-stable] [PATCH 1/5] net/sfc/base: fix incorrect error code usage in common code Andrew Rybchenko
2017-05-27  7:55 ` [dpdk-stable] [PATCH 4/5] net/sfc: add Tx queue flush failed flag for sanity Andrew Rybchenko
2017-05-30 12:08 ` [dpdk-stable] [PATCH 1/5] net/sfc/base: fix incorrect error code usage in common code Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).