netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] stmmac: platform: fix default values of the filter bins setting
@ 2014-11-26  2:38 Huacai Chen
  2014-11-26 17:16 ` Giuseppe CAVALLARO
  2014-11-26 17:29 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Huacai Chen @ 2014-11-26  2:38 UTC (permalink / raw)
  To: Giuseppe Cavallaro; +Cc: Vince Bridgers, David S. Miller, netdev, Huacai Chen

The commit 3b57de958e2a brought the support for a different amount of
the filter bins, but didn't update the platform driver that without
CONFIG_OF.

Fixes: 3b57de958e2a (net: stmmac: Support devicetree configs for mcast
and ucast filter entries)

Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index db56fa7..5b0da39 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -177,12 +177,6 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
 	 */
 	plat->maxmtu = JUMBO_LEN;
 
-	/* Set default value for multicast hash bins */
-	plat->multicast_filter_bins = HASH_TABLE_SIZE;
-
-	/* Set default value for unicast filter entries */
-	plat->unicast_filter_entries = 1;
-
 	/*
 	 * Currently only the properties needed on SPEAr600
 	 * are provided. All other properties should be added
@@ -270,6 +264,13 @@ static int stmmac_pltfr_probe(struct platform_device *pdev)
 		return PTR_ERR(addr);
 
 	plat_dat = dev_get_platdata(&pdev->dev);
+
+	/* Set default value for multicast hash bins */
+	plat_dat->multicast_filter_bins = HASH_TABLE_SIZE;
+
+	/* Set default value for unicast filter entries */
+	plat_dat->unicast_filter_entries = 1;
+
 	if (pdev->dev.of_node) {
 		if (!plat_dat)
 			plat_dat = devm_kzalloc(&pdev->dev,
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] stmmac: platform: fix default values of the filter bins setting
  2014-11-26  2:38 [PATCH] stmmac: platform: fix default values of the filter bins setting Huacai Chen
@ 2014-11-26 17:16 ` Giuseppe CAVALLARO
  2014-11-26 17:29 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Giuseppe CAVALLARO @ 2014-11-26 17:16 UTC (permalink / raw)
  To: Huacai Chen; +Cc: Vince Bridgers, David S. Miller, netdev

On 11/26/2014 3:38 AM, Huacai Chen wrote:
> The commit 3b57de958e2a brought the support for a different amount of
> the filter bins, but didn't update the platform driver that without
> CONFIG_OF.
>
> Fixes: 3b57de958e2a (net: stmmac: Support devicetree configs for mcast
> and ucast filter entries)
>
> Signed-off-by: Huacai Chen <chenhc@lemote.com>

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

> ---
>   .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |   13 +++++++------
>   1 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index db56fa7..5b0da39 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -177,12 +177,6 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
>   	 */
>   	plat->maxmtu = JUMBO_LEN;
>
> -	/* Set default value for multicast hash bins */
> -	plat->multicast_filter_bins = HASH_TABLE_SIZE;
> -
> -	/* Set default value for unicast filter entries */
> -	plat->unicast_filter_entries = 1;
> -
>   	/*
>   	 * Currently only the properties needed on SPEAr600
>   	 * are provided. All other properties should be added
> @@ -270,6 +264,13 @@ static int stmmac_pltfr_probe(struct platform_device *pdev)
>   		return PTR_ERR(addr);
>
>   	plat_dat = dev_get_platdata(&pdev->dev);
> +
> +	/* Set default value for multicast hash bins */
> +	plat_dat->multicast_filter_bins = HASH_TABLE_SIZE;
> +
> +	/* Set default value for unicast filter entries */
> +	plat_dat->unicast_filter_entries = 1;
> +
>   	if (pdev->dev.of_node) {
>   		if (!plat_dat)
>   			plat_dat = devm_kzalloc(&pdev->dev,
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] stmmac: platform: fix default values of the filter bins setting
  2014-11-26  2:38 [PATCH] stmmac: platform: fix default values of the filter bins setting Huacai Chen
  2014-11-26 17:16 ` Giuseppe CAVALLARO
@ 2014-11-26 17:29 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-11-26 17:29 UTC (permalink / raw)
  To: chenhc; +Cc: peppe.cavallaro, vbridgers2013, netdev

From: Huacai Chen <chenhc@lemote.com>
Date: Wed, 26 Nov 2014 10:38:06 +0800

> The commit 3b57de958e2a brought the support for a different amount of
> the filter bins, but didn't update the platform driver that without
> CONFIG_OF.
> 
> Fixes: 3b57de958e2a (net: stmmac: Support devicetree configs for mcast
> and ucast filter entries)
> 
> Signed-off-by: Huacai Chen <chenhc@lemote.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-26 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26  2:38 [PATCH] stmmac: platform: fix default values of the filter bins setting Huacai Chen
2014-11-26 17:16 ` Giuseppe CAVALLARO
2014-11-26 17:29 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).