Patchwork [5/6] net/ucc_geth: Assign six threads to Rx for UEC

login
register
mail settings
Submitter Haiying Wang
Date April 29, 2009, 6:14 p.m.
Message ID <1241028884406-git-send-email-Haiying.Wang@freescale.com>
Download mbox | patch
Permalink /patch/26633/
State Accepted
Delegated to: Kumar Gala
Headers show

Comments

Haiying Wang - April 29, 2009, 6:14 p.m.
when there are 46 snums defined in device tree.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
---
 drivers/net/ucc_geth.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Kumar Gala - April 29, 2009, 8:25 p.m.
On Apr 29, 2009, at 1:14 PM, Haiying Wang wrote:

> when there are 46 snums defined in device tree.
>
> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
> ---
> drivers/net/ucc_geth.c |    5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)

Can you be a bit more explicit in the commit message about the  
detection of 46 snums.  How is it that 46 snums equates to 6 threads?

- k

>
>
> diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
> index 3e003fe..1f6529f 100644
> --- a/drivers/net/ucc_geth.c
> +++ b/drivers/net/ucc_geth.c
> @@ -3709,7 +3709,10 @@ 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_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))
> -- 
> 1.6.0.2

Patch

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 3e003fe..1f6529f 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3709,7 +3709,10 @@  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_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))