Re: [PATCH net v2] net: stmmac: xgmac: fix handling of DPP safety error for DMA channels

From: Paolo Abeni
Date: Tue Jan 30 2024 - 06:41:21 EST


On Fri, 2024-01-26 at 15:39 +0800, Furong Xu wrote:
> @@ -914,7 +964,12 @@ static int dwxgmac3_safety_feat_irq_status(struct net_device *ndev,
> ret |= !corr;
> }
>
> - err = dma & (XGMAC_DEUIS | XGMAC_DECIS);
> + /* DMA_DPP_Interrupt_Status is indicated by MCSIS bit in
> + * DMA_Safety_Interrupt_Status, so we handle DMA Data Path
> + * Parity Errors here
> + */
> + err = (dma & (XGMAC_DEUIS | XGMAC_DECIS)) ||
> + (dma & XGMAC_MCSIS);

The above syntax is IMHO confusing,

err = (dma & (XGMAC_DEUIS | XGMAC_DECIS | XGMAC_MCSIS))

should be more readable.

Cheers,

Paolo