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

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

From: Łukasz Majewski <hidden>
Date: 2025-08-18 20:08:05
Also in: imx, linux-arm-kernel, linux-devicetree, lkml

Hi Jakub,
On Wed, 13 Aug 2025 09:07:50 +0200 Lukasz Majewski wrote:
quoted
+	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;
quoted
+	}
+
+	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.
quoted
+		/* Set default interrupt mask for L2 switch */
+		writel(MCF_ESW_IMR_RXF | MCF_ESW_IMR_TXF,
+		       fep->hwp + ESW_IMR);
+	}  


-- 
Best regards,

Łukasz Majewski
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help