Re: [PATCH net-next 09/15] net: macb: introduce DMA descriptor helpers (is 64bit? is PTP?)
From: Andrew Lunn
Date: Fri Oct 17 2025 - 14:07:57 EST
On Tue, Oct 14, 2025 at 05:25:10PM +0200, Théo Lebrun wrote:
> Introduce macb_dma64() and macb_dma_ptp() helper functions.
> Many codepaths are made simpler by dropping conditional compilation.
>
> This implies two additional changes:
> - Always compile related structure definitions inside <macb.h>.
> - MACB_EXT_DESC can be dropped as it is useless now.
>
> The common case:
>
> #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
> struct macb_dma_desc_64 *desc_64;
> if (bp->hw_dma_cap & HW_DMA_CAP_64B) {
> desc_64 = macb_64b_desc(bp, desc);
> // ...
> }
> #endif
>
> Is replaced by:
>
> if (macb_dma64(bp)) {
> struct macb_dma_desc_64 *desc_64 = macb_64b_desc(bp, desc);
> // ...
> }
>
> Signed-off-by: Théo Lebrun <theo.lebrun@xxxxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew