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: 73159 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 00346B7339 for ; Fri, 26 Nov 2010 19:38:05 +1100 (EST) Received: from AM1EHSOBE003.bigfish.com (am1ehsobe003.messaging.microsoft.com [213.199.154.206]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Cybertrust SureServer Standard Validation CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 74A2DB70A9 for ; Fri, 26 Nov 2010 19:37:58 +1100 (EST) Received: from mail36-am1-R.bigfish.com (10.3.201.253) by AM1EHSOBE003.bigfish.com (10.3.204.23) with Microsoft SMTP Server id 14.1.225.8; Fri, 26 Nov 2010 08:37:51 +0000 Received: from mail36-am1 (localhost.localdomain [127.0.0.1]) by mail36-am1-R.bigfish.com (Postfix) with ESMTP id D4D8113F04E9 for ; Fri, 26 Nov 2010 08:37:51 +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 mail36-am1 (localhost.localdomain [127.0.0.1]) by mail36-am1 (MessageSwitch) id 1290760671557211_31206; Fri, 26 Nov 2010 08:37:51 +0000 (UTC) Received: from AM1EHSMHS006.bigfish.com (unknown [10.3.201.248]) by mail36-am1.bigfish.com (Postfix) with ESMTP id 7C08F14B804C for ; Fri, 26 Nov 2010 08:37:51 +0000 (UTC) Received: from de01egw01.freescale.net (192.88.165.102) by AM1EHSMHS006.bigfish.com (10.3.207.106) with Microsoft SMTP Server (TLS) id 14.1.225.8; Fri, 26 Nov 2010 08:37:49 +0000 Received: from de01smr02.am.mot.com (de01smr02.freescale.net [10.208.0.151]) by de01egw01.freescale.net (8.14.3/8.14.3) with ESMTP id oAQ8dYnM023246 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 de01smr02.am.mot.com (8.13.1/8.13.0) with ESMTP id oAQ8tYtw029254 for ; Fri, 26 Nov 2010 02:55:35 -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: , , 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 Cc: Anton Vorontsov , Jean-Denis Boyer , Andreas Schmitz X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 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 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 */