netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]NET:PCNET32: poll method return 0 when done
@ 2009-11-11 15:11 Figo.zhang
  2009-11-12 16:13 ` Don Fry
  0 siblings, 1 reply; 3+ messages in thread
From: Figo.zhang @ 2009-11-11 15:11 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

Poll method return 0 when it is done.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
--- 
drivers/net/pcnet32.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index c1b3f09..58894a3 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -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);



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH]NET:PCNET32: poll method return 0 when done
  2009-11-11 15:11 [PATCH]NET:PCNET32: poll method return 0 when done Figo.zhang
@ 2009-11-12 16:13 ` Don Fry
  2009-11-14  3:39   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Don Fry @ 2009-11-12 16:13 UTC (permalink / raw)
  To: Figo.zhang; +Cc: David S. Miller, netdev

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 <figo1802@gmail.com>
To: David S. Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>
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.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
--- 
drivers/net/pcnet32.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index c1b3f09..58894a3 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH]NET:PCNET32: poll method return 0 when done
  2009-11-12 16:13 ` Don Fry
@ 2009-11-14  3:39   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-11-14  3:39 UTC (permalink / raw)
  To: pcnet32; +Cc: figo1802, netdev

From: Don Fry <pcnet32@verizon.net>
Date: Thu, 12 Nov 2009 08:13:21 -0800

> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-14  3:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-11 15:11 [PATCH]NET:PCNET32: poll method return 0 when done Figo.zhang
2009-11-12 16:13 ` Don Fry
2009-11-14  3:39   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).