From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jongsung Kim <neidhard.kim@lge.com>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <alexander.levin@microsoft.com>
Subject: [PATCH AUTOSEL 3.18 3/6] stmmac: fix valid numbers of unicast filter entries
Date: Fri, 5 Oct 2018 12:17:47 -0400 [thread overview]
Message-ID: <20181005161750.20823-3-sashal@kernel.org> (raw)
In-Reply-To: <20181005161750.20823-1-sashal@kernel.org>
From: Jongsung Kim <neidhard.kim@lge.com>
[ Upstream commit edf2ef7242805e53ec2e0841db26e06d8bc7da70 ]
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.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 58a1a0a423d4..4d718e738522 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -85,7 +85,7 @@ static int dwmac1000_validate_mcast_bins(int mcast_bins)
/* 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.
@@ -95,8 +95,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.17.1
next prev parent reply other threads:[~2018-10-05 16:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 16:17 [PATCH AUTOSEL 3.18 1/6] selftests/efivarfs: add required kernel configs Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 3.18 2/6] mfd: omap-usb-host: Fix dts probe of children Sasha Levin
2018-10-05 16:17 ` Sasha Levin [this message]
2018-10-05 16:17 ` [PATCH AUTOSEL 3.18 4/6] net: hp100: fix always-true check for link up state Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 3.18 5/6] floppy: Do not copy a kernel pointer to user memory in FDGETPRM ioctl Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 3.18 6/6] ubifs: Check for name being NULL while mounting Sasha Levin
2018-10-05 16:24 ` Richard Weinberger
2018-10-10 15:00 ` Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181005161750.20823-3-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alexander.levin@microsoft.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=neidhard.kim@lge.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox