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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 21 Nov 2022 18:34:01 +0100
From:   Lorenzo Bianconi <lorenzo@...nel.org>
To:     Alexander Lobakin <alexandr.lobakin@...el.com>
Cc:     netdev@...r.kernel.org, nbd@....name, john@...ozen.org,
        sean.wang@...iatek.com, Mark-MC.Lee@...iatek.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, lorenzo.bianconi@...hat.com,
        sujuan.chen@...iatek.com, linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net-next 1/5] net: ethernet: mtk_wed: return status value
 in mtk_wdma_rx_reset

> 
> From: Lorenzo Bianconi <lorenzo@...nel.org>
> Date: Mon, 21 Nov 2022 09:59:21 +0100
> 
> > Move MTK_WDMA_RESET_IDX configuration in mtk_wdma_rx_reset routine.
> > This is a preliminary patch to add Wireless Ethernet Dispatcher reset
> > support.
> > 
> > Co-developed-by: Sujuan Chen <sujuan.chen@...iatek.com>
> > Signed-off-by: Sujuan Chen <sujuan.chen@...iatek.com>
> > Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> > ---
> >  drivers/net/ethernet/mediatek/mtk_wed.c | 25 ++++++++++++-------------
> >  1 file changed, 12 insertions(+), 13 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c
> > index 7d8842378c2b..dc898ded2f05 100644
> > --- a/drivers/net/ethernet/mediatek/mtk_wed.c
> > +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
> > @@ -101,17 +101,21 @@ mtk_wdma_read_reset(struct mtk_wed_device *dev)
> >  	return wdma_r32(dev, MTK_WDMA_GLO_CFG);
> >  }
> >  
> > -static void
> > +static int
> >  mtk_wdma_rx_reset(struct mtk_wed_device *dev)
> >  {
> >  	u32 status, mask = MTK_WDMA_GLO_CFG_RX_DMA_BUSY;
> > -	int i;
> > +	int i, ret;
> >  
> >  	wdma_clr(dev, MTK_WDMA_GLO_CFG, MTK_WDMA_GLO_CFG_RX_DMA_EN);
> > -	if (readx_poll_timeout(mtk_wdma_read_reset, dev, status,
> > -			       !(status & mask), 0, 1000))
> > +	ret = readx_poll_timeout(mtk_wdma_read_reset, dev, status,
> > +				 !(status & mask), 0, 10000);
> 
> You didn't mention anywhere this change of the timeout from 1000 to
> 10000, and for example for me it's not clear from the code why you
> did this. Maybe leave a comment in the commitmsg?
> Same in 2/5 for Tx, also 1000 -> 10000.

ops I forgot them, sorry. I actually aligned the these values to the vendor sdk.

Regards,
Lorenzo

> 
> > +	if (ret)
> >  		dev_err(dev->hw->dev, "rx reset failed\n");
> >  
> > +	wdma_w32(dev, MTK_WDMA_RESET_IDX, MTK_WDMA_RESET_IDX_RX);
> > +	wdma_w32(dev, MTK_WDMA_RESET_IDX, 0);
> > +
> >  	for (i = 0; i < ARRAY_SIZE(dev->rx_wdma); i++) {
> >  		if (dev->rx_wdma[i].desc)
> >  			continue;
> 
> [...]
> 
> > -- 
> > 2.38.1
> 
> Thanks,
> Olek

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ