[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZaZLuPyRa5QhRrmH@shell.armlinux.org.uk>
Date: Tue, 16 Jan 2024 09:26:16 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Jenishkumar Maheshbhai Patel <jpatel2@...vell.com>
Cc: marcin.s.wojtas@...il.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] net: mvpp2: clear BM pool before initialization
On Mon, Jan 15, 2024 at 09:57:54PM -0800, Jenishkumar Maheshbhai Patel wrote:
> static int mvpp2_bm_init(struct device *dev, struct mvpp2 *priv)
> {
> enum dma_data_direction dma_dir = DMA_FROM_DEVICE;
> int i, err, poolnum = MVPP2_BM_POOLS_NUM;
> struct mvpp2_port *port;
>
> + if (priv->percpu_pools)
> + poolnum = mvpp2_get_nrxqs(priv) * 2;
> +
> + for (i = 0; i < poolnum; i++) {
> + /* Make sure about the pool state in case it was
> + * used by firmware.
> + */
> + mvpp2_bm_pool_cleanup(priv, i);
> + }
/* Clean up the pool state in case it contains stale state */
for (i = 0; i < poolnum; i++)
mvpp2_bm_pool_cleanup(priv, i);
Doesn't need quite as many lines!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists