From patchwork Fri Nov 26 09:29:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 73160 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 DD672B70A9 for ; Fri, 26 Nov 2010 19:53:04 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753854Ab0KZIw7 (ORCPT ); Fri, 26 Nov 2010 03:52:59 -0500 Received: from am1ehsobe004.messaging.microsoft.com ([213.199.154.207]:35559 "EHLO AM1EHSOBE004.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753389Ab0KZIw6 (ORCPT ); Fri, 26 Nov 2010 03:52:58 -0500 X-Greylist: delayed 906 seconds by postgrey-1.27 at vger.kernel.org; Fri, 26 Nov 2010 03:52:58 EST Received: from mail19-am1-R.bigfish.com (10.3.201.246) by AM1EHSOBE004.bigfish.com (10.3.204.24) with Microsoft SMTP Server id 14.1.225.8; Fri, 26 Nov 2010 08:37:50 +0000 Received: from mail19-am1 (localhost.localdomain [127.0.0.1]) by mail19-am1-R.bigfish.com (Postfix) with ESMTP id E3D754901DB for ; Fri, 26 Nov 2010 08:37:50 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bh8275chz2dh2a8h691h668h67dh685h66h) X-Spam-TCS-SCL: 5:0 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:de01egw01.freescale.net; RD:de01egw01.freescale.net; EFVD:NLI Received: from mail19-am1 (localhost.localdomain [127.0.0.1]) by mail19-am1 (MessageSwitch) id 1290760670687394_21381; Fri, 26 Nov 2010 08:37:50 +0000 (UTC) Received: from AM1EHSMHS009.bigfish.com (unknown [10.3.201.246]) by mail19-am1.bigfish.com (Postfix) with ESMTP id A4FD452004F for ; Fri, 26 Nov 2010 08:37:50 +0000 (UTC) Received: from de01egw01.freescale.net (192.88.165.102) by AM1EHSMHS009.bigfish.com (10.3.207.109) with Microsoft SMTP Server (TLS) id 14.1.225.8; Fri, 26 Nov 2010 08:37:49 +0000 Received: from de01smr01.freescale.net (de01smr01.freescale.net [10.208.0.31]) by de01egw01.freescale.net (8.14.3/8.14.3) with ESMTP id oAQ8dYOs023247 for ; Fri, 26 Nov 2010 01:39:34 -0700 (MST) Received: from zch01exm26.fsl.freescale.net (zch01exm26.ap.freescale.net [10.192.129.221]) by de01smr01.freescale.net (8.13.1/8.13.0) with ESMTP id oAQ8sPGV006107 for ; Fri, 26 Nov 2010 02:54:26 -0600 (CST) Received: from localhost ([10.193.20.133]) by zch01exm26.fsl.freescale.net with Microsoft SMTPSVC(6.0.3790.4675); Fri, 26 Nov 2010 16:38:59 +0800 From: Li Yang To: , , CC: Li Yang , Jean-Denis Boyer , Andreas Schmitz , Anton Vorontsov Subject: [PATCH] ucc_geth: fix ucc halt problem in half duplex mode Date: Fri, 26 Nov 2010 17:29:58 +0800 Message-ID: <1290763798-22844-1-git-send-email-leoli@freescale.com> X-Mailer: git-send-email 1.6.6-rc1.GIT X-OriginalArrivalTime: 26 Nov 2010 08:38:59.0289 (UTC) FILETIME=[5ECC2C90:01CB8D45] MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In commit 58933c64(ucc_geth: Fix the wrong the Rx/Tx FIFO size), the UCC_GETH_UTFTT_INIT is set to 512 based on the recommendation of the QE Reference Manual. But that will sometimes cause tx halt while working in half duplex mode. According to errata draft QE_GENERAL-A003(High Tx Virtual FIFO threshold size can cause UCC to halt), setting UTFTT less than [(UTFS x (M - 8)/M) - 128] will prevent this from happening (M is the minimum buffer size). The patch changes UTFTT back to 256. Signed-off-by: Li Yang Cc: Jean-Denis Boyer Cc: Andreas Schmitz Cc: Anton Vorontsov --- drivers/net/ucc_geth.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/ucc_geth.h b/drivers/net/ucc_geth.h index 05a9558..a78b9c0 100644 --- a/drivers/net/ucc_geth.h +++ b/drivers/net/ucc_geth.h @@ -899,7 +899,8 @@ struct ucc_geth_hardware_statistics { #define UCC_GETH_UTFS_INIT 512 /* Tx virtual FIFO size */ #define UCC_GETH_UTFET_INIT 256 /* 1/2 utfs */ -#define UCC_GETH_UTFTT_INIT 512 +#define UCC_GETH_UTFTT_INIT 256 /* 1/2 utfs + due to errata */ /* Gigabit Ethernet (1000 Mbps) */ #define UCC_GETH_URFS_GIGA_INIT 4096/*2048*/ /* Rx virtual FIFO size */