All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniil Stas <daniil.stas@posteo.net>
To: u-boot@lists.denx.de
Subject: [PATCH 5/8] net: dwc_eth_qos: add dwc eqos for imx support
Date: Tue,  4 May 2021 22:07:54 +0000	[thread overview]
Message-ID: <69e71623-37af-b648-cbf2-fae40a1f41d2@posteo.net> (raw)
In-Reply-To: <20200428030228.19964-6-peng.fan@nxp.com>

Hi, i think there are some issues with this patch.

> @@ -1131,6 +1205,7 @@ 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 */

What is this address: &eqos->mtl_regs->txq0_quantum_weight - 0x100?
Isn't it outside of MTL registers range?

> @@ -1144,7 +1219,9 @@ 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_RSF |
> +		     EQOS_MTL_RXQ0_OPERATION_MODE_FEP |
> +		     EQOS_MTL_RXQ0_OPERATION_MODE_FUP);
>  
>  	/* Transmit/Receive queue fifo size; use all RAM for 1 queue */
>  	val = readl(&eqos->mac_regs->hw_feature1);

Why do you set FEP and FUP bits? It can lead to data corruption as they
allow accepting erroneous packets.

I think these options should only be used in some debugging mode but not
in production.

> @@ -1220,6 +1297,19 @@ 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);
> +

This line just overrides the value set in the previous line.
Is it a mistake?

> +	/* enable promise mode */
> +	setbits_le32(&eqos->mac_regs->unused_004[1],
> +		     0x1);
> +

Isn't this mode also useful only for debugging?

  reply	other threads:[~2021-05-04 22:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28  3:02 [PATCH 0/8] net: several updates to support i.MX Peng Fan
2020-04-28  3:02 ` [PATCH 1/8] net: eth-uclass: add return value check Peng Fan
2020-04-28  3:02 ` [PATCH 2/8] net: Add eth phy generic driver for shared MDIO Peng Fan
2020-04-28  3:02 ` [PATCH 3/8] net: Update eQos driver and FEC driver to use eth phy interfaces Peng Fan
2020-04-28  3:02 ` [PATCH 4/8] net: phy: realtek: add rx delay support for RTL8211F Peng Fan
2020-04-28  3:02 ` [PATCH 5/8] net: dwc_eth_qos: add dwc eqos for imx support Peng Fan
2021-05-04 22:07   ` Daniil Stas [this message]
2020-04-28  3:02 ` [PATCH 6/8] net: eqos: implement callbaks to get interface and set txclk rate Peng Fan
2020-04-28  3:02 ` [PATCH 7/8] fec: Move imx_get_mac_from_fuse declare to imx file Peng Fan
2020-04-28  3:02 ` [PATCH 8/8] eQos: Implement the read_rom_hwaddr callback Peng Fan

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=69e71623-37af-b648-cbf2-fae40a1f41d2@posteo.net \
    --to=daniil.stas@posteo.net \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.