Re: [PATCH net-next] net: stmmac: mask the MAC interrupt while resume resets the MAC

From: Andrew Lunn

Date: Sun Oct 04 2026 - 10:43:17 EST


On Fri, Oct 02, 2026 at 07:36:23AM +0300, Igor Velkov wrote:
> On Thu, Oct 01, 2026 at 02:40:46PM +0200, Andrew Lunn wrote:
> > For my understanding, it is the hardware reset which clears the mask,
> > not software?
> >
> > If it is hardware, that is an odd hardware design.
>
> Yes, the hardware: dwmac_dma_reset() sets SWR in DMA_BUS_MODE and the
> MAC returns its registers to their reset values. On dwmac1000
> GMAC_INT_MASK is a mask register, so its reset value 0 unmasks
> everything; dwmac4 has an enable register (GMAC_INT_EN) instead.

So the hardware design dictates that you must be ready to receive
interrupts when you reset the device, or at least, have them blocked
at a higher level in the interrupt tree.

Is probe written this way? Does the needed code already exists, its
just not used on resume when it should be?

Andrew