From patchwork Mon May 3 11:42:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 51494 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 41702B7D12 for ; Mon, 3 May 2010 21:42:53 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758180Ab0ECLmr (ORCPT ); Mon, 3 May 2010 07:42:47 -0400 Received: from mail.deheime.ch ([62.12.167.34]:34138 "EHLO limpopo.deheime.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757824Ab0ECLmq convert rfc822-to-8bit (ORCPT ); Mon, 3 May 2010 07:42:46 -0400 Received: from localhost (localhost [127.0.0.1]) by limpopo.deheime.ch (Postfix) with ESMTP id 7AE794313A; Mon, 3 May 2010 13:42:45 +0200 (CEST) X-Virus-Scanned: by amavisd-new at deheime.ch Received: from limpopo.deheime.ch ([127.0.0.1]) by localhost (limpopo.deheime.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ygLgQj61CyyV; Mon, 3 May 2010 13:42:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by limpopo.deheime.ch (Postfix) with ESMTP id EF9A543144; Mon, 3 May 2010 13:42:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: falstaff@deheime.ch) by limpopo.deheime.ch (Postfix) with ESMTP id CDBE14313A; Mon, 3 May 2010 13:42:44 +0200 (CEST) Received: from 3-61.1-85.cust.bluewin.ch (3-61.1-85.cust.bluewin.ch [85.1.61.3]) by limpopo.deheime.ch (Horde Framework) with HTTP; Mon, 03 May 2010 13:42:44 +0200 Message-ID: <20100503134244.42345pyaszhd9f8c@limpopo.deheime.ch> Date: Mon, 03 May 2010 13:42:44 +0200 From: Stefan Agner To: Lennert Buytenhek Cc: netdev@vger.kernel.org Subject: [PATCH] ep93xx_eth stopps receiving packets References: <20100419173813.7750395f4fkkmrk0@limpopo.deheime.ch> <20100502104350.GS4586@mail.wantstofly.org> In-Reply-To: <20100502104350.GS4586@mail.wantstofly.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Internet Messaging Program (IMP) H3 (4.3) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Receiving small packet(s) in a fast pace leads to not receiving any packets at all after some time. After ethernet packet(s) arrived the receive descriptor is incremented by the number of frames processed. If another packet arrives while processing, this is processed in another call of ep93xx_rx. This second call leads that too many receive descriptors getting released. This fix increments, even in these case, the right number of processed receive descriptors. Signed-off-by: Stefan Agner Acked-by: Lennert Buytenhek --- drivers/net/arm/ep93xx_eth.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index 6995169..cd6cd3e 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c @@ -311,11 +311,6 @@ err: processed++; } - if (processed) { - wrw(ep, REG_RXDENQ, processed); - wrw(ep, REG_RXSTSENQ, processed); - } - return processed; } @@ -350,6 +345,11 @@ poll_some_more: goto poll_some_more; } + if (rx) { + wrw(ep, REG_RXDENQ, rx); + wrw(ep, REG_RXSTSENQ, rx); + } + return rx; }