Skip to contentSkip to conversation

NET:PCNET32: poll method return 0 when done

PATCH NAK Figo.zhang 3 participants 3 messages Nov 12, 2009 – Nov 14, 2009

Subsystems (2)
lore
Share & tools
lore

Figo.zhang

author
#0 lore raw

PATCH 1/1 NET:PCNET32: poll method return 0 when done

Poll method return 0 when it is done.

---
drivers/net/pcnet32.c | 1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/pcnet32.c +1 -0
index c1b3f09..58894a3 100644
@@ -1396,6 +1396,7 @@ static int pcnet32_poll(struct napi_struct *napi, int budget)
 	spin_unlock_irqrestore(&lp->lock, flags);
 
 	if (work_done < budget) {
+		work_done = 0;
 		spin_lock_irqsave(&lp->lock, flags);
 
 		__napi_complete(napi);
#1 lore raw

I do not understand why you are suggesting this change. With NAPI the amount of work done is returned on exit, not zero. All other drivers I have looked at do not force a zero on exit.

NAK

Don

-----Original Message-----
From: Figo.zhang <[email protected]>
To: David S. Miller <[email protected]>
Cc: netdev <[email protected]>
Subject: [PATCH]NET:PCNET32: poll method return 0 when done
Date: Wed, 11 Nov 2009 23:11:36 +0800

Poll method return 0 when it is done.

---
drivers/net/pcnet32.c | 1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/pcnet32.c +1 -0
index c1b3f09..58894a3 100644
@@ -1396,6 +1396,7 @@ static int pcnet32_poll(struct napi_struct *napi, int budget)
 	spin_unlock_irqrestore(&lp->lock, flags);
 
 	if (work_done < budget) {
+		work_done = 0;
 		spin_lock_irqsave(&lp->lock, flags);
 
 		__napi_complete(napi);

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#2 lore raw

From: Don Fry <[email protected]>
Date: Thu, 12 Nov 2009 08:13:21 -0800

Quoted 5 lines

I do not understand why you are suggesting this change. With NAPI the amount of work done is returned on exit, not zero. All other drivers I have looked at do not force a zero on exit.

NAK

Right, this change is completely wrong.