[net-next v18 2/7] net: mtip: The L2 switch driver for imx287

Łukasz Majewski lukasz.majewski at mailbox.org
Mon Aug 18 13:07:54 PDT 2025


Hi Jakub,

> On Wed, 13 Aug 2025 09:07:50 +0200 Lukasz Majewski wrote:
> > +	pkts = mtip_switch_rx(napi->dev, budget, &port);
> > +	if (pkts == -ENOMEM) {
> > +		napi_complete(napi);
> > +		return 0;  
> 
> And what happens next? looks like you're not unmasking the interrupt
> in this case so we'll never get an IRQ until timeout kicks in?

Good point - I shall set the "default" set of interrupts before return
0;

> 
> > +	}
> > +
> > +	if ((port == 1 || port == 2) && fep->ndev[port - 1])
> > +		mtip_switch_tx(fep->ndev[port - 1]);
> > +	else
> > +		mtip_switch_tx(napi->dev);
> > +
> > +	if (pkts < budget) {
> > +		napi_complete_done(napi, pkts);  
> 
> Please take napi_complete_done()'s return value into account

Ok.

> 
> > +		/* Set default interrupt mask for L2 switch */
> > +		writel(MCF_ESW_IMR_RXF | MCF_ESW_IMR_TXF,
> > +		       fep->hwp + ESW_IMR);
> > +	}  



-- 
Best regards,

Łukasz Majewski



More information about the linux-arm-kernel mailing list