From patchwork Thu Nov 12 16:13:21 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Fry X-Patchwork-Id: 38258 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 3FE2EB7B74 for ; Fri, 13 Nov 2009 03:13:52 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753235AbZKLQNl (ORCPT ); Thu, 12 Nov 2009 11:13:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753176AbZKLQNl (ORCPT ); Thu, 12 Nov 2009 11:13:41 -0500 Received: from vms173011pub.verizon.net ([206.46.173.11]:57796 "EHLO vms173011pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752816AbZKLQNk (ORCPT ); Thu, 12 Nov 2009 11:13:40 -0500 Received: from [192.168.1.3] ([173.50.157.101]) by vms173011.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KT0007OP7Q9KFR0@vms173011.mailsrvcs.net> for netdev@vger.kernel.org; Thu, 12 Nov 2009 10:13:23 -0600 (CST) Subject: Re: [PATCH]NET:PCNET32: poll method return 0 when done From: Don Fry To: "Figo.zhang" Cc: "David S. Miller" , netdev In-reply-to: <1257952296.1920.3.camel@myhost> References: <1257952296.1920.3.camel@myhost> Content-type: text/plain Date: Thu, 12 Nov 2009 08:13:21 -0800 Message-id: <1258042401.7727.3.camel@localhost.localdomain> MIME-version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-2.fc10) Content-transfer-encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 To: David S. Miller Cc: netdev 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 --- drivers/net/pcnet32.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- 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 -- 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 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);