Subject: Re: [PATCH net-next v4 4/6] net: tn40xx: add basic Rx handling

From: Jakub Kicinski <[email-masked]>
Date: Mon, 6 May 2024 18:58:37 -0700

On Thu,  2 May 2024 08:05:50 +0900 FUJITA Tomonori wrote:
> @@ -745,6 +1248,21 @@ static irqreturn_t tn40_isr_napi(int irq, void *dev)
>  	return IRQ_HANDLED;
>  }
>  
> +static int tn40_poll(struct napi_struct *napi, int budget)
> +{
> +	struct tn40_priv *priv = container_of(napi, struct tn40_priv, napi);
> +	int work_done;
> +
> +	tn40_tx_cleanup(priv);
> +
> +	work_done = tn40_rx_receive(priv, &priv->rxd_fifo0, budget);
> +	if (work_done < budget) {
> +		napi_complete(napi);

napi_complete_done() works better with busy polling and such 

> +		tn40_enable_interrupts(priv);
> +	}
> +	return work_done;
> +}
> +

> +	netif_napi_del(&priv->napi);
> +	napi_disable(&priv->napi);

These two lines are likely in the wrong order