From patchwork Mon Oct 12 16:00:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 35779 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id E209CB8801 for ; Tue, 13 Oct 2009 03:00:58 +1100 (EST) Received: by ozlabs.org (Postfix) id C8CF5B7F87; Tue, 13 Oct 2009 03:00:34 +1100 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from buildserver.ru.mvista.com (unknown [213.79.90.228]) by ozlabs.org (Postfix) with ESMTP id 6FCAAB7E7E for ; Tue, 13 Oct 2009 03:00:34 +1100 (EST) Received: from localhost (unknown [10.150.0.9]) by buildserver.ru.mvista.com (Postfix) with ESMTP id 1648F881B; Mon, 12 Oct 2009 21:00:33 +0500 (SAMST) Date: Mon, 12 Oct 2009 20:00:33 +0400 From: Anton Vorontsov To: David Miller Subject: [PATCH 3/8] gianfar: Don't needlessly set the wrap bit for the last RX BD Message-ID: <20091012160033.GC2463@oksana.dev.rtsoft.ru> References: <20091012160000.GA32406@oksana.dev.rtsoft.ru> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091012160000.GA32406@oksana.dev.rtsoft.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Scott Wood , linuxppc-dev@ozlabs.org, netdev@vger.kernel.org, Andy Fleming X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org startup_gfar() sets the wrap bit for the last rxbd just after gfar_new_rxbdp() call, which is issued for all rxbds. And gfar_new_rxbdp() has the following check already: if (bdp == priv->rx_bd_base + priv->rx_ring_size - 1) lstatus |= BD_LFLAG(RXBD_WRAP); So we don't need to set the bit again. Signed-off-by: Anton Vorontsov --- drivers/net/gianfar.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index b7881e6..ee23431 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -1028,10 +1028,6 @@ int startup_gfar(struct net_device *ndev) rxbdp++; } - /* Set the last descriptor in the ring to wrap */ - rxbdp--; - rxbdp->status |= RXBD_WRAP; - /* If the device has multiple interrupts, register for * them. Otherwise, only register for the one */ if (priv->device_flags & FSL_GIANFAR_DEV_HAS_MULTI_INTR) {