mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v1 1/2] net: designware: eqos: fix receive issue with external switch
Date: Tue, 12 Apr 2022 10:55:47 +0200	[thread overview]
Message-ID: <20220412085547.GA4012@pengutronix.de> (raw)
In-Reply-To: <20220407090246.953707-1-o.rempel@pengutronix.de>

On Thu, Apr 07, 2022 at 11:02:45AM +0200, Oleksij Rempel wrote:
> Do not drop packets with error status (CRC error, receive error, watchdog
> timeout, or overflow) otherwise we wont be able to receive packets from
> a switch with enabled tagging.
> 
> In case we have switch with tagging enabled, ingress packets will be
> modified by the switch. Most probably this will affect CRC calculation,
> so all incoming packets are dropped.
> 
> Setting FEP and FUP is recommended programming model described in
> STM32MP157 reference manual. See "64.9.2 MTL initialization":
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  drivers/net/designware_eqos.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/net/designware_eqos.c b/drivers/net/designware_eqos.c
> index 8d2a21c220..1f97d84880 100644
> --- a/drivers/net/designware_eqos.c
> +++ b/drivers/net/designware_eqos.c
> @@ -112,6 +112,8 @@ 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
> @@ -433,7 +435,9 @@ static int eqos_start(struct eth_device *edev)
>  
>  	/* 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);
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      parent reply	other threads:[~2022-04-12  8:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  9:02 Oleksij Rempel
2022-04-07  9:02 ` [PATCH v1 2/2] net: designware: eqos: do not try to talk to not existing PHY Oleksij Rempel
2022-04-07 12:23   ` Ahmad Fatoum
2022-04-07 12:39     ` Oleksij Rempel
2022-04-07 12:23 ` [PATCH v1 1/2] net: designware: eqos: fix receive issue with external switch Ahmad Fatoum
2022-04-12  8:55 ` Sascha Hauer [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=20220412085547.GA4012@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=o.rempel@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox