Thread (13 messages) 13 messages, 2 authors, 2025-08-19

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

flat view

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-08-16 01:29:31
Also in: imx, linux-arm-kernel, linux-devicetree, lkml

On Wed, 13 Aug 2025 09:07:50 +0200 Lukasz Majewski wrote:
quoted hunk ↗ jump to hunk
+	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?
quoted hunk ↗ jump to hunk
+	}
+
+	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
quoted hunk ↗ jump to hunk
+		/* Set default interrupt mask for L2 switch */
+		writel(MCF_ESW_IMR_RXF | MCF_ESW_IMR_TXF,
+		       fep->hwp + ESW_IMR);
+	}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help