[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB537070A29526C1DB55F35942EC8B9@BN9PR11MB5370.namprd11.prod.outlook.com>
Date: Fri, 15 Jul 2022 01:30:36 +0000
From: "Chang, Junxiao" <junxiao.chang@...el.com>
To: Paolo Abeni <pabeni@...hat.com>,
"peppe.cavallaro@...com" <peppe.cavallaro@...com>,
"alexandre.torgue@...s.st.com" <alexandre.torgue@...s.st.com>,
"joabreu@...opsys.com" <joabreu@...opsys.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH 2/2] net: stmmac: remove duplicate dma queue channel
macros
Sure. Thank you for reviewing it. I will submit 1st "net: stmmac: fix dma queue left shift overflow issue" to net. In future, will post this patch to net-next after 1st patch landing.
Thanks,
Junxiao
-----Original Message-----
From: Paolo Abeni <pabeni@...hat.com>
Sent: Thursday, July 14, 2022 6:13 PM
To: Chang, Junxiao <junxiao.chang@...el.com>; peppe.cavallaro@...com; alexandre.torgue@...s.st.com; joabreu@...opsys.com; netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] net: stmmac: remove duplicate dma queue channel macros
On Wed, 2022-07-13 at 16:47 +0800, Junxiao Chang wrote:
> It doesn't need extra macros for queue 0 & 4. Same macro could be used
> for all 8 queues.
>
> Signed-off-by: Junxiao Chang <junxiao.chang@...el.com>
This looks like a net-next cleanup for the previous patch, which instead looks like a proper -net candidate. Would you mind re-posting the two patch separatelly, waiting for the fix to land into net-next before posting the cleanup?
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 4 +---
> drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 11 ++++-------
> 2 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h
> b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h
> index 462ca7ed095a2..a7b725a7519bb 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h
> @@ -330,9 +330,7 @@ enum power_event {
>
> #define MTL_RXQ_DMA_MAP0 0x00000c30 /* queue 0 to 3 */
> #define MTL_RXQ_DMA_MAP1 0x00000c34 /* queue 4 to 7 */
> -#define MTL_RXQ_DMA_Q04MDMACH_MASK GENMASK(3, 0)
> -#define MTL_RXQ_DMA_Q04MDMACH(x) ((x) << 0)
> -#define MTL_RXQ_DMA_QXMDMACH_MASK(x) GENMASK(11 + (8 * ((x) - 1)), 8 * (x))
> +#define MTL_RXQ_DMA_QXMDMACH_MASK(x) GENMASK(3 + (8 * (x)), 8 * (x))
> #define MTL_RXQ_DMA_QXMDMACH(chan, q) ((chan) << (8 * (q)))
if you here use ((x) & 0x3) instead of (x) and ((q) & 0x3) instead of (q), you can avoid the if statement below.
>
0x7 since there might be 8 channels/queues? This way looks a bit tricky. 😊
cheers,
Paolo
Powered by blists - more mailing lists