From patchwork Fri May 1 19:40:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haiying Wang X-Patchwork-Id: 26776 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id B0B8CB7080 for ; Sat, 2 May 2009 05:42:30 +1000 (EST) Received: by ozlabs.org (Postfix) id 9AC57DE3FC; Sat, 2 May 2009 05:41:32 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 98B7DDE3FB for ; Sat, 2 May 2009 05:41:32 +1000 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from az33egw02.freescale.net (az33egw02.freescale.net [192.88.158.103]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "az33egw02.freescale.net", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id C485FDDE00 for ; Sat, 2 May 2009 05:40:46 +1000 (EST) Received: from de01smr01.freescale.net (de01smr01.freescale.net [10.208.0.31]) by az33egw02.freescale.net (8.14.3/az33egw02) with ESMTP id n41JeURH014034; Fri, 1 May 2009 12:40:30 -0700 (MST) Received: from r54964-12.am.freescale.net (R54964-12.am.freescale.net [10.29.201.229]) by de01smr01.freescale.net (8.13.1/8.13.0) with ESMTP id n41JeT7r004407; Fri, 1 May 2009 14:40:30 -0500 (CDT) Received: from r54964-12.am.freescale.net (localhost.localdomain [127.0.0.1]) by r54964-12.am.freescale.net (8.13.8/8.13.8) with ESMTP id n41Jet6C027786; Fri, 1 May 2009 15:40:56 -0400 Received: (from why@localhost) by r54964-12.am.freescale.net (8.13.8/8.13.8/Submit) id n41JetgB027785; Fri, 1 May 2009 15:40:55 -0400 From: Haiying Wang To: linuxppc-dev@ozlabs.org, galak@kernel.crashing.org Subject: [PATCH 5/6 v2] net/ucc_geth: Assign six threads to Rx for UEC Date: Fri, 1 May 2009 15:40:49 -0400 Message-Id: <1241206851-27749-3-git-send-email-Haiying.Wang@freescale.com> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1241206851-27749-2-git-send-email-Haiying.Wang@freescale.com> References: <1241206851-27749-1-git-send-email-Haiying.Wang@freescale.com> <1241206851-27749-2-git-send-email-Haiying.Wang@freescale.com> X-Brightmail-Tracker: AAAAAQAAAWE= Cc: Haiying Wang X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org in the case the QE has 46 SNUMs for the threads to support four UCC Ethernet at 1000Base-T simultaneously. Signed-off-by: Haiying Wang Acked-by: Timur Tabi Acked-by: David S. Miller --- v2 change: Add comments for the Rx threads change. drivers/net/ucc_geth.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 44f8392..1cb2710 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -3702,7 +3702,15 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ug_info->uf_info.utfet = UCC_GETH_UTFET_GIGA_INIT; ug_info->uf_info.utftt = UCC_GETH_UTFTT_GIGA_INIT; ug_info->numThreadsTx = UCC_GETH_NUM_OF_THREADS_4; - ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_4; + + /* If QE's snum number is 46 which means we need to support + * 4 UECs at 1000Base-T simultaneously, we need to allocate + * more Threads to Rx. + */ + if (qe_get_num_of_snums() == 46) + ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_6; + else + ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_4; } if (netif_msg_probe(&debug))