lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB8510A9A2B763664AEB720A7588A6A@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Thu, 4 Dec 2025 09:10:53 +0000
From: Wei Fang <wei.fang@....com>
To: Paolo Abeni <pabeni@...hat.com>, Shenwei Wang <shenwei.wang@....com>,
	Clark Wang <xiaoning.wang@....com>, "andrew+netdev@...n.ch"
	<andrew+netdev@...n.ch>, "davem@...emloft.net" <davem@...emloft.net>,
	"edumazet@...gle.com" <edumazet@...gle.com>, "kuba@...nel.org"
	<kuba@...nel.org>
CC: "imx@...ts.linux.dev" <imx@...ts.linux.dev>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net] net: fec: ERR007885 Workaround for XDP TX path

> On 11/28/25 3:59 AM, Wei Fang wrote:
> > The ERR007885 will lead to a TDAR race condition for mutliQ when the
> > driver sets TDAR and the UDMA clears TDAR simultaneously or in a small
> > window (2-4 cycles). And it will cause the udma_tx and udma_tx_arbiter
> > state machines to hang. Therefore, the commit 53bb20d1faba ("net: fec:
> > add variable reg_desc_active to speed things up") and the commit
> > a179aad12bad ("net: fec: ERR007885 Workaround for conventional TX") have
> > added the workaround to fix the potential issue for the conventional TX
> > path. Similarly, the XDP TX path should also have the potential hang
> > issue, so add the workaround for XDP TX path.
> >
> > Fixes: 6d6b39f180b8 ("net: fec: add initial XDP support")
> > Signed-off-by: Wei Fang <wei.fang@....com>
> > ---
> >  drivers/net/ethernet/freescale/fec_main.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> > index 3222359ac15b..e2b75d1970ae 100644
> > --- a/drivers/net/ethernet/freescale/fec_main.c
> > +++ b/drivers/net/ethernet/freescale/fec_main.c
> > @@ -3948,7 +3948,12 @@ static int fec_enet_txq_xmit_frame(struct
> fec_enet_private *fep,
> >  	txq->bd.cur = bdp;
> >
> >  	/* Trigger transmission start */
> > -	writel(0, txq->bd.reg_desc_active);
> > +	if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
> > +	    !readl(txq->bd.reg_desc_active) ||
> > +	    !readl(txq->bd.reg_desc_active) ||
> > +	    !readl(txq->bd.reg_desc_active) ||
> > +	    !readl(txq->bd.reg_desc_active))
> > +		writel(0, txq->bd.reg_desc_active);
> >
> >  	return 0;
> >  }
> 
> LGTM!
> 
> Side note for a net-next follow-up: please consider moving this logic in
> a reusable helper, since you already have a few potentials call sites.
> 

Yes, I have already planned to add a helper after this patch is merged
into net-next tree. :)

> /P

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ