Thread (3 messages) flat view 3 messages, 2 authors, 2012-05-14

Re: [PATCH v2 5/5] net: sh_eth: use NAPI

From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
Date: 2012-05-14 06:14:23
Also in: linux-sh

2012/05/12 0:35, Ben Hutchings wrote:
On Fri, 2012-05-11 at 17:38 +0900, Shimoda, Yoshihiro wrote:
quoted
This patch modifies the driver to use NAPI.
[...]
quoted
+static int sh_eth_poll(struct napi_struct *napi, int budget)
+{
< snip >
quoted
+	/* check whether the controller doesn't have any events */
+	if (!txfree_num && !(intr_status & cd->eesr_err_check) &&
+	    work_done < budget) {
+		napi_complete(napi);
If and only if you return a value less than the budget then you *must*
call napi_complete().  You can't add these extra conditions.
Thank you for the point. I will fix it.

< snip >
You will also need to call napi_disable() and napi_enable() in the
set_ringparam implementation.
I will add the code in sh_eth_set_ringparam().
Ben.
Best regards,
Yoshihiro Shimoda
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help