From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 401D9C48BE5 for ; Sat, 12 Jun 2021 18:37:17 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ADA8161287 for ; Sat, 12 Jun 2021 18:37:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADA8161287 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2774A80EC6; Sat, 12 Jun 2021 20:37:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AjoVXKAx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AAC3480EC7; Sat, 12 Jun 2021 20:37:13 +0200 (CEST) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DC87080C72 for ; Sat, 12 Jun 2021 20:37:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rfried.dev@gmail.com Received: by mail-ej1-x629.google.com with SMTP id og14so9543739ejc.5 for ; Sat, 12 Jun 2021 11:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:content-transfer-encoding:date:message-id:cc:subject :from:to:references:in-reply-to; bh=sDi27r6Q32DR7HHWF9WERwdSoMkEg4Ww9a+vZQv4gsg=; b=AjoVXKAxkLrLU9kywfK5WTPHYqtomrG94I8kZOQVJ2sg3LAwxYPYxYrqQEHBtjheQS A8MDktfw6XBdECjE5tn/6SDIjqdNi8MQn5TuICm56tm65L+YYbJTpqQu/VepgDsZ/rN/ 3ENoX8eKqrcUMbKgNsB+N3cSCZ6FlGrhTPG49QclU6NqebJFVGtemHnizK5N7n/P3LZW RiJcIr63oWJRv+2yORBI7flRmKpyZyE2GRqYpmL1RwYy8dIKnjwthoAg9Yo8gYd1XACj m88Kkbyh8z61dizb6kCUGsWAbUV3krOF+IoXs1JeS/+GSHG0pQDdO8CVqj6D+1oWigpe aPsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:date :message-id:cc:subject:from:to:references:in-reply-to; bh=sDi27r6Q32DR7HHWF9WERwdSoMkEg4Ww9a+vZQv4gsg=; b=Nvw+k8/e1qxALroK//S1rubxljUZVWmGP214bid5L2Ikqka8UWgfYqVCHlWLTPFtMt uVLor/W/Xepcds1Gu4AnGuelrDcKqx7oaY7/A/WDZhre+y0+B4xyJGla3wPdaoQoF7Qh BIzsiTXZg8NFodYGdxM6vrj/lrYsDnRKFHnthZzYtteRFgWtBYEGDr5+41x6dUNRW/5F /4XmBuwoUGUyoePowVV4sLU29jD3/EfDDfK/5TchNnMUy2Q7KDPy7woz0GW1vfFBiVce A27igOVyy8Z3nfBD1isLTwKl4t3mKu6BVJW+Xe3NscQl9e92TJ4atirZqOjiqhyb5fap O3dw== X-Gm-Message-State: AOAM531rC4UR6xIx7xaOmGEKSDOQzBD4skbrtWgQbueJ9c+nDNcH5cww qbt+aQfCAeIYfdxXZPDkneLWtlCNP2esQw== X-Google-Smtp-Source: ABdhPJyYQKfyZlETKCAORsWPThpCsilq5ub58nI/l1QKTOqbSZXljIW3jj0vqIbwNUheV63Y6ZYphg== X-Received: by 2002:a17:906:f192:: with SMTP id gs18mr8911488ejb.114.1623523030628; Sat, 12 Jun 2021 11:37:10 -0700 (PDT) Received: from localhost ([2a00:a040:198:e68a::1004]) by smtp.gmail.com with ESMTPSA id z19sm2551234edc.90.2021.06.12.11.37.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Jun 2021 11:37:10 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 12 Jun 2021 21:37:08 +0300 Message-Id: Cc: "Ye Li" , "Fugang Duan" , "Peng Fan" , "Joe Hershberger" , "Patrice Chotard" , "Patrick Delaunay" Subject: Re: [PATCH] net: dwc_eth_qos: Revert some changes of commit 3a97da12ee7b From: "Ramon Fried" To: "Daniil Stas" , References: <20210530133409.1669336-1-daniil.stas@posteo.net> In-Reply-To: <20210530133409.1669336-1-daniil.stas@posteo.net> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Sun May 30, 2021 at 4:34 PM IDT, Daniil Stas wrote: > Revert some changes of commit 3a97da12ee7b ("net: dwc_eth_qos: add dwc > eqos for imx support") that were probably added by mistake. > > One of these changes can lead to received data corruption (enabling > FUP and FEP bits). Another causes invalid register rxq_ctrl0 settings > for some platforms. And another makes some writes at unknown memory > location. > > Fixes: 3a97da12ee7b ("net: dwc_eth_qos: add dwc eqos for imx support") > Signed-off-by: Daniil Stas > Cc: Ye Li > Cc: Fugang Duan > Cc: Peng Fan > Cc: Ramon Fried > Cc: Joe Hershberger > Cc: Patrice Chotard > Cc: Patrick Delaunay > --- > drivers/net/dwc_eth_qos.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c > index 2f088c758f..b012bed517 100644 > --- a/drivers/net/dwc_eth_qos.c > +++ b/drivers/net/dwc_eth_qos.c > @@ -172,8 +172,6 @@ struct eqos_mtl_regs { > #define EQOS_MTL_RXQ0_OPERATION_MODE_RFA_MASK 0x3f > #define EQOS_MTL_RXQ0_OPERATION_MODE_EHFC BIT(7) > #define EQOS_MTL_RXQ0_OPERATION_MODE_RSF BIT(5) > -#define EQOS_MTL_RXQ0_OPERATION_MODE_FEP BIT(4) > -#define EQOS_MTL_RXQ0_OPERATION_MODE_FUP BIT(3) > =20 > #define EQOS_MTL_RXQ0_DEBUG_PRXQ_SHIFT 16 > #define EQOS_MTL_RXQ0_DEBUG_PRXQ_MASK 0x7fff > @@ -1222,7 +1220,6 @@ static int eqos_start(struct udevice *dev) > } > =20 > /* Configure MTL */ > - writel(0x60, &eqos->mtl_regs->txq0_quantum_weight - 0x100); > =20 > /* Enable Store and Forward mode for TX */ > /* Program Tx operating mode */ > @@ -1236,9 +1233,7 @@ static int eqos_start(struct udevice *dev) > =20 > /* Enable Store and Forward mode for RX, since no jumbo frame */ > setbits_le32(&eqos->mtl_regs->rxq0_operation_mode, > - EQOS_MTL_RXQ0_OPERATION_MODE_RSF | > - EQOS_MTL_RXQ0_OPERATION_MODE_FEP | > - EQOS_MTL_RXQ0_OPERATION_MODE_FUP); > + EQOS_MTL_RXQ0_OPERATION_MODE_RSF); > =20 > /* Transmit/Receive queue fifo size; use all RAM for 1 queue */ > val =3D readl(&eqos->mac_regs->hw_feature1); > @@ -1314,12 +1309,6 @@ static int eqos_start(struct udevice *dev) > eqos->config->config_mac << > EQOS_MAC_RXQ_CTRL0_RXQ0EN_SHIFT); > =20 > - clrsetbits_le32(&eqos->mac_regs->rxq_ctrl0, > - EQOS_MAC_RXQ_CTRL0_RXQ0EN_MASK << > - EQOS_MAC_RXQ_CTRL0_RXQ0EN_SHIFT, > - 0x2 << > - EQOS_MAC_RXQ_CTRL0_RXQ0EN_SHIFT); > - > /* Multicast and Broadcast Queue Enable */ > setbits_le32(&eqos->mac_regs->unused_0a4, > 0x00100000); > -- > 2.31.1 pplied to u-boot-net/master, thanks! Best regards, Ramon Fried