Re: [PATCH net-next 05/12] net: stmmac: dwxgmac2: Add multi MSI interrupt mode

From: Andrew Lunn

Date: Fri May 01 2026 - 13:22:38 EST


On Fri, May 01, 2026 at 10:54:13AM -0500, Alex Elder wrote:
> From: Daniel Thompson <daniel@xxxxxxxxxxxx>
>
> Currently there are no XGMAC platforms integrated using the multi MSI
> interrupt mode. In other words no existing driver sets both
> DWMAC_CORE_XGMAC and STMMAC_FLAG_MULTI_MSI_EN.
>
> In order to support systems that do enable both options (such as the
> Toshiba TC9564 whose driver is currently being developed) we need to
> add logic to the XGMAC DMA callbacks. Happily we can simply
> replicate similar code from GMAC4. Let's do that!

The word replicate made me think it has been cut/paste, rather than
being refactored into a helper. However,

> +#define XGMAC_INTM_MASK GENMASK(13, 12)

#define DMA_BUS_MODE_INTM_MASK GENMASK(17, 16)

Different bits in the register, so the code structure is the same, but
the code cannot be shared in a meaningful way. So this is O.K.

Andrew