All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stmmac: fix valid numbers of unicast filter entries
@ 2018-09-13  9:32 Jongsung Kim
  2018-09-16 22:24 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jongsung Kim @ 2018-09-13  9:32 UTC (permalink / raw)
  To: linux-kernel, netdev, Giuseppe Cavallaro, Alexandre Torgue,
	Jose Abreu, David S . Miller
  Cc: Chanho Min, Jongsung Kim

Synopsys DWC Ethernet MAC can be configured to have 1..32, 64, or
128 unicast filter entries. (Table 7-8 MAC Address Registers from
databook) Fix dwmac1000_validate_ucast_entries() to accept values
between 1 and 32 in addition.

Signed-off-by: Jongsung Kim <neidhard.kim@lge.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 3609c7b..2b800ce 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -67,7 +67,7 @@ static int dwmac1000_validate_mcast_bins(int mcast_bins)
  * Description:
  * This function validates the number of Unicast address entries supported
  * by a particular Synopsys 10/100/1000 controller. The Synopsys controller
- * supports 1, 32, 64, or 128 Unicast filter entries for it's Unicast filter
+ * supports 1..32, 64, or 128 Unicast filter entries for it's Unicast filter
  * logic. This function validates a valid, supported configuration is
  * selected, and defaults to 1 Unicast address if an unsupported
  * configuration is selected.
@@ -77,8 +77,7 @@ static int dwmac1000_validate_ucast_entries(int ucast_entries)
 	int x = ucast_entries;
 
 	switch (x) {
-	case 1:
-	case 32:
+	case 1 ... 32:
 	case 64:
 	case 128:
 		break;
-- 
2.7.4


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

* Re: [PATCH] stmmac: fix valid numbers of unicast filter entries
  2018-09-13  9:32 [PATCH] stmmac: fix valid numbers of unicast filter entries Jongsung Kim
@ 2018-09-16 22:24 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-09-16 22:24 UTC (permalink / raw)
  To: neidhard.kim
  Cc: linux-kernel, netdev, peppe.cavallaro, alexandre.torgue, joabreu,
	chanho.min

From: Jongsung Kim <neidhard.kim@lge.com>
Date: Thu, 13 Sep 2018 18:32:21 +0900

> Synopsys DWC Ethernet MAC can be configured to have 1..32, 64, or
> 128 unicast filter entries. (Table 7-8 MAC Address Registers from
> databook) Fix dwmac1000_validate_ucast_entries() to accept values
> between 1 and 32 in addition.
> 
> Signed-off-by: Jongsung Kim <neidhard.kim@lge.com>

Applied, thank you.

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

end of thread, other threads:[~2018-09-16 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-13  9:32 [PATCH] stmmac: fix valid numbers of unicast filter entries Jongsung Kim
2018-09-16 22:24 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.