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

* [dpdk-stable] [PATCH 4/5] net/sfc: add Tx queue flush failed flag for sanity
  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 ` 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
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Rybchenko @ 2017-05-27  7:55 UTC (permalink / raw)
  To: dev; +Cc: stable

Avoid usage of flushing state when Tx queue flush init failed.

Fixes: fed9aeb46c19 ("net/sfc: implement transmit path start / stop")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_tx.c | 2 +-
 drivers/net/sfc/sfc_tx.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
index d75fb84..9e426ca 100644
--- a/drivers/net/sfc/sfc_tx.c
+++ b/drivers/net/sfc/sfc_tx.c
@@ -503,7 +503,7 @@ sfc_tx_qstop(struct sfc_adapter *sa, unsigned int sw_index)
 	     (retry_count < SFC_TX_QFLUSH_ATTEMPTS);
 	     ++retry_count) {
 		if (efx_tx_qflush(txq->common) != 0) {
-			txq->state |= SFC_TXQ_FLUSHING;
+			txq->state |= SFC_TXQ_FLUSH_FAILED;
 			break;
 		}
 
diff --git a/drivers/net/sfc/sfc_tx.h b/drivers/net/sfc/sfc_tx.h
index 6c3ac3b..0c1c708 100644
--- a/drivers/net/sfc/sfc_tx.h
+++ b/drivers/net/sfc/sfc_tx.h
@@ -64,6 +64,8 @@ enum sfc_txq_state_bit {
 #define SFC_TXQ_FLUSHING	(1 << SFC_TXQ_FLUSHING_BIT)
 	SFC_TXQ_FLUSHED_BIT,
 #define SFC_TXQ_FLUSHED		(1 << SFC_TXQ_FLUSHED_BIT)
+	SFC_TXQ_FLUSH_FAILED_BIT,
+#define SFC_TXQ_FLUSH_FAILED	(1 << SFC_TXQ_FLUSH_FAILED_BIT)
 };
 
 /**
-- 
2.9.4

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

* Re: [dpdk-stable] [PATCH 1/5] net/sfc/base: fix incorrect error code usage in common code
  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 ` Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-05-30 12:08 UTC (permalink / raw)
  To: Andrew Rybchenko, dev; +Cc: Andy Moreton, stable

On 5/27/2017 8:55 AM, Andrew Rybchenko wrote:
> 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>

Series applied to dpdk-next-net/master, thanks.

^ 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).