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

Jakub Kicinski kuba at kernel.org
Fri Aug 15 18:29:30 PDT 2025


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?

> +	}
> +
> +	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

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



More information about the linux-arm-kernel mailing list