public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Ramon Fried" <rfried.dev@gmail.com>
To: "Daniil Stas" <daniil.stas@posteo.net>, <u-boot@lists.denx.de>
Cc: "Ye Li" <ye.li@nxp.com>, "Fugang Duan" <fugang.duan@nxp.com>,
	"Peng Fan" <peng.fan@nxp.com>,
	"Joe Hershberger" <joe.hershberger@ni.com>,
	"Patrice Chotard" <patrice.chotard@foss.st.com>,
	"Patrick Delaunay" <patrick.delaunay@foss.st.com>
Subject: Re: [PATCH] net: dwc_eth_qos: Revert some changes of commit 3a97da12ee7b
Date: Sat, 12 Jun 2021 21:37:08 +0300	[thread overview]
Message-ID: <CC1UVQOYNEQD.89ZPL0S2RHKC@stdcall-pc> (raw)
In-Reply-To: <20210530133409.1669336-1-daniil.stas@posteo.net>

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 <daniil.stas@posteo.net>
> Cc: Ye Li <ye.li@nxp.com>
> Cc: Fugang Duan <fugang.duan@nxp.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Ramon Fried <rfried.dev@gmail.com>
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 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)
>  
> #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)
> }
>  
> /* Configure MTL */
> - writel(0x60, &eqos->mtl_regs->txq0_quantum_weight - 0x100);
>  
> /* Enable Store and Forward mode for TX */
> /* Program Tx operating mode */
> @@ -1236,9 +1233,7 @@ static int eqos_start(struct udevice *dev)
>  
> /* 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);
>  
> /* Transmit/Receive queue fifo size; use all RAM for 1 queue */
> val = 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);
>  
> - 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

      parent reply	other threads:[~2021-06-12 18:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-30 13:34 [PATCH] net: dwc_eth_qos: Revert some changes of commit 3a97da12ee7b Daniil Stas
2021-06-12 18:34 ` Ramon Fried
2021-06-12 18:37 ` Ramon Fried [this message]

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=CC1UVQOYNEQD.89ZPL0S2RHKC@stdcall-pc \
    --to=rfried.dev@gmail.com \
    --cc=daniil.stas@posteo.net \
    --cc=fugang.duan@nxp.com \
    --cc=joe.hershberger@ni.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    --cc=ye.li@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