DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: ferruh.yigit@intel.com
Cc: dev@dpdk.org, g.singh@nxp.com,
	Alex Marginean <alexandru.marginean@nxp.com>
Subject: [dpdk-dev] [PATCH 04/10] net/enetc: erratum wa for Rx lock-up issue
Date: Mon,  2 Mar 2020 20:02:03 +0530	[thread overview]
Message-ID: <20200302143209.11854-5-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <20200302143209.11854-1-hemant.agrawal@nxp.com>

From: Alex Marginean <alexandru.marginean@nxp.com>

The default value in hardware for the Rx MAC FIFO (@) is higher than it
should be and can lead to Rx lock-up under traffic.
Set it to the value recommended by hardware team, 1.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/net/enetc/base/enetc_hw.h | 3 ++-
 drivers/net/enetc/enetc_ethdev.c  | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enetc/base/enetc_hw.h b/drivers/net/enetc/base/enetc_hw.h
index 2fe7ccb5b..00813284e 100644
--- a/drivers/net/enetc/base/enetc_hw.h
+++ b/drivers/net/enetc/base/enetc_hw.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018-2019 NXP
+ * Copyright 2018-2020 NXP
  */
 
 #ifndef _ENETC_HW_H_
@@ -86,6 +86,7 @@ enum enetc_bdr_type {TX, RX};
 #define ENETC_PSIPMAR1(n)		(0x00104 + (n) * 0x20)
 #define ENETC_PCAPR0			0x00900
 #define ENETC_PCAPR1			0x00904
+#define ENETC_PM0_RX_FIFO		0x801C
 #define ENETC_PM0_IF_MODE		0x8300
 #define ENETC_PM1_IF_MODE		0x9300
 #define ENETC_PMO_IFM_RG		BIT(2)
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 20b77c006..eb637d030 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018-2019 NXP
+ * Copyright 2018-2020 NXP
  */
 
 #include <stdbool.h>
@@ -147,6 +147,9 @@ enetc_hardware_init(struct enetc_eth_hw *hw)
 	hw->hw.port = (void *)((size_t)hw->hw.reg + ENETC_PORT_BASE);
 	hw->hw.global = (void *)((size_t)hw->hw.reg + ENETC_GLOBAL_BASE);
 
+	/* WA for Rx lock-up HW erratum */
+	enetc_port_wr(enetc_hw, ENETC_PM0_RX_FIFO, 1);
+
 	/* Enabling Station Interface */
 	enetc_wr(enetc_hw, ENETC_SIMR, ENETC_SIMR_EN);
 
-- 
2.17.1


  parent reply	other threads:[~2020-03-02  9:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 14:31 [dpdk-dev] [PATCH 00/10] net/enetc: optimization and cleanup Hemant Agrawal
2020-03-02 14:32 ` [dpdk-dev] [PATCH 01/10] net/enetc: do not stall in clean Tx ring Hemant Agrawal
2020-03-02 14:32 ` [dpdk-dev] [PATCH 02/10] net/enetc: use relaxed read for Tx CI in clean Tx Hemant Agrawal
2020-03-02 14:32 ` [dpdk-dev] [PATCH 03/10] net/enetc: batch process enetc clean Tx ring calls Hemant Agrawal
2020-03-02 14:32 ` Hemant Agrawal [this message]
2020-03-02 14:32 ` [dpdk-dev] [PATCH 05/10] net/enetc: improve batching Rx ring refill Hemant Agrawal
2020-03-02 14:32 ` [dpdk-dev] [PATCH 06/10] net/enetc: cache align enetc bdr structure Hemant Agrawal
2020-03-02 14:32 ` [dpdk-dev] [PATCH 07/10] net/enetc: use bulk alloc in Rx refill ring Hemant Agrawal
2020-03-02 14:32 ` [dpdk-dev] [PATCH 08/10] net/enetc: use bulk free in Tx clean Hemant Agrawal
2020-03-02 14:32 ` [dpdk-dev] [PATCH 09/10] net/enetc: improve prefetch in Rx ring clean Hemant Agrawal
2020-03-02 14:32 ` [dpdk-dev] [PATCH 10/10] net/enetc: init SI transactions attribute reg Hemant Agrawal
2020-03-03 12:31 ` [dpdk-dev] [PATCH 00/10] net/enetc: optimization and cleanup Gagandeep Singh
2020-03-03 14:02   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200302143209.11854-5-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=alexandru.marginean@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=g.singh@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).