[PATCH v1 1/2] net: designware: eqos: fix receive issue with external switch

Sascha Hauer sha at pengutronix.de
Tue Apr 12 01:55:47 PDT 2022


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 at 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 at 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 |



More information about the barebox mailing list