From patchwork Mon Mar 2 14:32:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 184065 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp2169994ile; Mon, 2 Mar 2020 01:01:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzbUChmQEtKEN5fuLvmO0/v0mwKhUuc2wCsbmSzP4EJ1x+T5UKQvjx/R68HVhnV88QgQoRE X-Received: by 2002:a50:ed12:: with SMTP id j18mr15538199eds.337.1583139661534; Mon, 02 Mar 2020 01:01:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583139661; cv=none; d=google.com; s=arc-20160816; b=Mb/9hsCymefei5Mxc4R9z1MOAnEUFTUtNmhYFBtYhT3GGEv7eswIJ9ihreDgKozvIf BfEnbS00hQg3XrhZEHN5h793Len1jILU4umVBPY4MY5a73EL8Kuyi+Z9AIq0pRV6ZNnn TRutmO0VvmAsQNzmMD3yuOvWXqP5k/SUqiZgzcKQh4nQ3IbGNBSEyK24Hc3i3Ia6XVpi cQjBOknesJ0aBGtEqa4AvGB9qvS0qhCp1TGpGPrdrlIhoQXdI+hG4nqoI2KqeQ/U8q2C vWrxKBZcgZmuYvFG10NREi6EaYZfU2WAH56NBijSsnHfXu6xFPNYd/3mUvsof/IgfAHH WUaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=/jKQuQxA8iGMpVbmNTbTfkr1HF2d47x4rhivHWKoPOk=; b=SoCkmbWdZcoXz3+tnQOBCm0bziM5Zrt2phdsgubmOHwZXqRXMirqiDnnP3HBxERM8n YGk9iURa4dJdJLSP+/NcbrFpLPWNV0XopNimo4TJknodPHcc0xaU4RGtAPvJRWCukbed +H79OV1rQLcgxfARWyiN+Yn2OWt6dR6xjmne3uNQusIDt0+BucphddkfZ733usBp17wX HcP8Meca49HFWepUNBYoRiX0kAW7laOIjdYRTR4eU7Nmzx8OWtpXmNATGoumRzrDmhdW P2Q0GV2jtD+iDFEcAYoRxmSGVIderM2OSTgAG0INNkZBRpl1YzUog46ibykxiy+bzxOZ k34w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id si2si6005092ejb.69.2020.03.02.01.01.01; Mon, 02 Mar 2020 01:01:01 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4C24C1C067; Mon, 2 Mar 2020 10:00:22 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id BA3431C01B for ; Mon, 2 Mar 2020 10:00:17 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 9EFED1A0FBA; Mon, 2 Mar 2020 10:00:17 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1F4311A0FC1; Mon, 2 Mar 2020 10:00:15 +0100 (CET) Received: from bf-netperf1.ap.com (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 6C60D402F3; Mon, 2 Mar 2020 17:00:11 +0800 (SGT) From: Hemant Agrawal To: ferruh.yigit@intel.com Cc: dev@dpdk.org, g.singh@nxp.com, Alex Marginean Date: Mon, 2 Mar 2020 20:02:03 +0530 Message-Id: <20200302143209.11854-5-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200302143209.11854-1-hemant.agrawal@nxp.com> References: <20200302143209.11854-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 04/10] net/enetc: erratum wa for Rx lock-up issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Alex Marginean 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 Signed-off-by: Gagandeep Singh --- drivers/net/enetc/base/enetc_hw.h | 3 ++- drivers/net/enetc/enetc_ethdev.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) -- 2.17.1 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 @@ -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);