patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 2/4] net/qede/base: fix to clear HW indication
       [not found] <1532470724-31668-1-git-send-email-rasesh.mody@cavium.com>
@ 2018-07-24 22:18 ` Rasesh Mody
  2018-07-24 22:18 ` [dpdk-stable] [PATCH 3/4] net/qede/base: fix GRC attention callback Rasesh Mody
  2018-07-24 22:18 ` [dpdk-stable] [PATCH 4/4] net/qede: fix MAC address removal failure message Rasesh Mody
  2 siblings, 0 replies; 3+ messages in thread
From: Rasesh Mody @ 2018-07-24 22:18 UTC (permalink / raw)
  To: dev; +Cc: Rasesh Mody, ferruh.yigit, Dept-EngDPDKDev, stable

VDMs may cause the was_error indication to be set after the driver
clears it. Clear the indication after the internal FID_enable for
the PF is set.

Fixes: 60c78a5e258a ("net/qede/base: fix recovery from previous ungraceful exit")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/ecore_dev.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c
index cfe73c6..31f1f3e 100644
--- a/drivers/net/qede/base/ecore_dev.c
+++ b/drivers/net/qede/base/ecore_dev.c
@@ -2511,9 +2511,8 @@ enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,
 			}
 		}
 
-		/* Log and clean previous pglue_b errors if such exist */
+		/* Log and clear previous pglue_b errors if such exist */
 		ecore_pglueb_rbc_attn_handler(p_hwfn, p_hwfn->p_main_ptt, true);
-		ecore_pglueb_clear_err(p_hwfn, p_hwfn->p_main_ptt);
 
 		/* Enable the PF's internal FID_enable in the PXP */
 		rc = ecore_pglueb_set_pfid_enable(p_hwfn, p_hwfn->p_main_ptt,
@@ -2521,6 +2520,13 @@ enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,
 		if (rc != ECORE_SUCCESS)
 			goto load_err;
 
+		/* Clear the pglue_b was_error indication.
+		 * In E4 it must be done after the BME and the internal
+		 * FID_enable for the PF are set, since VDMs may cause the
+		 * indication to be set again.
+		 */
+		ecore_pglueb_clear_err(p_hwfn, p_hwfn->p_main_ptt);
+
 		switch (load_code) {
 		case FW_MSG_CODE_DRV_LOAD_ENGINE:
 			rc = ecore_hw_init_common(p_hwfn, p_hwfn->p_main_ptt,
-- 
1.7.10.3

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

* [dpdk-stable] [PATCH 3/4] net/qede/base: fix GRC attention callback
       [not found] <1532470724-31668-1-git-send-email-rasesh.mody@cavium.com>
  2018-07-24 22:18 ` [dpdk-stable] [PATCH 2/4] net/qede/base: fix to clear HW indication Rasesh Mody
@ 2018-07-24 22:18 ` Rasesh Mody
  2018-07-24 22:18 ` [dpdk-stable] [PATCH 4/4] net/qede: fix MAC address removal failure message Rasesh Mody
  2 siblings, 0 replies; 3+ messages in thread
From: Rasesh Mody @ 2018-07-24 22:18 UTC (permalink / raw)
  To: dev; +Cc: Rasesh Mody, ferruh.yigit, Dept-EngDPDKDev, stable

Treat any attention which is not for timeout event as invalid
and return status accordingly. The HW error handler logs and clears
the HW attention. Without this fix we can see flood of GRC attentions.

Fixes: e6051bd6b07d ("qede: add interrupt handling support")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/ecore_int.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/qede/base/ecore_int.c b/drivers/net/qede/base/ecore_int.c
index ce8fac1..4c271d3 100644
--- a/drivers/net/qede/base/ecore_int.c
+++ b/drivers/net/qede/base/ecore_int.c
@@ -231,15 +231,19 @@ static const char *grc_timeout_attn_master_to_str(u8 master)
 
 static enum _ecore_status_t ecore_grc_attn_cb(struct ecore_hwfn *p_hwfn)
 {
+	enum _ecore_status_t rc = ECORE_SUCCESS;
 	u32 tmp, tmp2;
 
 	/* We've already cleared the timeout interrupt register, so we learn
-	 * of interrupts via the validity register
+	 * of interrupts via the validity register.
+	 * Any attention which is not for a timeout event is treated as fatal.
 	 */
 	tmp = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
 		       GRC_REG_TIMEOUT_ATTN_ACCESS_VALID);
-	if (!(tmp & ECORE_GRC_ATTENTION_VALID_BIT))
+	if (!(tmp & ECORE_GRC_ATTENTION_VALID_BIT)) {
+		rc = ECORE_INVAL;
 		goto out;
+	}
 
 	/* Read the GRC timeout information */
 	tmp = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
@@ -263,11 +267,11 @@ static enum _ecore_status_t ecore_grc_attn_cb(struct ecore_hwfn *p_hwfn)
 		  (tmp2 & ECORE_GRC_ATTENTION_VF_MASK) >>
 		  ECORE_GRC_ATTENTION_VF_SHIFT);
 
-out:
-	/* Regardles of anything else, clean the validity bit */
+	/* Clean the validity bit */
 	ecore_wr(p_hwfn, p_hwfn->p_dpc_ptt,
 		 GRC_REG_TIMEOUT_ATTN_ACCESS_VALID, 0);
-	return ECORE_SUCCESS;
+out:
+	return rc;
 }
 
 #define ECORE_PGLUE_ATTENTION_VALID (1 << 29)
-- 
1.7.10.3

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

* [dpdk-stable] [PATCH 4/4] net/qede: fix MAC address removal failure message
       [not found] <1532470724-31668-1-git-send-email-rasesh.mody@cavium.com>
  2018-07-24 22:18 ` [dpdk-stable] [PATCH 2/4] net/qede/base: fix to clear HW indication Rasesh Mody
  2018-07-24 22:18 ` [dpdk-stable] [PATCH 3/4] net/qede/base: fix GRC attention callback Rasesh Mody
@ 2018-07-24 22:18 ` Rasesh Mody
  2 siblings, 0 replies; 3+ messages in thread
From: Rasesh Mody @ 2018-07-24 22:18 UTC (permalink / raw)
  To: dev; +Cc: Shahed Shaikh, ferruh.yigit, Dept-EngDPDKDev, stable

From: Shahed Shaikh <shahed.shaikh@cavium.com>

Don't treat MAC address removal failure as a fatal error
and print in logs.

Fixes: 77fac1b54fc9 ("net/qede: fix filtering code")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
---
 drivers/net/qede/qede_ethdev.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 88c805c..df52ea9 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -959,7 +959,10 @@ static int qede_del_mcast_filters(struct rte_eth_dev *eth_dev)
 	if (rc == 0)
 		rc = ecore_filter_ucast_cmd(edev, ucast,
 					    ECORE_SPQ_MODE_CB, NULL);
-	if (rc != ECORE_SUCCESS)
+	/* Indicate error only for add filter operation.
+	 * Delete filter operations are not severe.
+	 */
+	if ((rc != ECORE_SUCCESS) && add)
 		DP_ERR(edev, "MAC filter failed, rc = %d, op = %d\n",
 		       rc, add);
 
-- 
1.7.10.3

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

end of thread, other threads:[~2018-07-24 22:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1532470724-31668-1-git-send-email-rasesh.mody@cavium.com>
2018-07-24 22:18 ` [dpdk-stable] [PATCH 2/4] net/qede/base: fix to clear HW indication Rasesh Mody
2018-07-24 22:18 ` [dpdk-stable] [PATCH 3/4] net/qede/base: fix GRC attention callback Rasesh Mody
2018-07-24 22:18 ` [dpdk-stable] [PATCH 4/4] net/qede: fix MAC address removal failure message Rasesh Mody

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