public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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 4.4 06/11] stmmac: fix valid numbers of unicast filter entries
Date: Fri,  5 Oct 2018 12:17:31 -0400	[thread overview]
Message-ID: <20181005161736.20765-6-sashal@kernel.org> (raw)
In-Reply-To: <20181005161736.20765-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 d02691ba3d7f..20aa34f45f07 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -71,7 +71,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.
@@ -81,8 +81,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


  parent reply	other threads:[~2018-10-05 16:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-05 16:17 [PATCH AUTOSEL 4.4 01/11] ASoC: wm8804: Add ACPI support Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 4.4 02/11] ASoC: sigmadsp: safeload should not have lower byte limit Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 4.4 03/11] selftests/efivarfs: add required kernel configs Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 4.4 04/11] mfd: omap-usb-host: Fix dts probe of children Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 4.4 05/11] sound: enable interrupt after dma buffer initialization Sasha Levin
2018-10-05 16:17 ` Sasha Levin [this message]
2018-10-05 16:17 ` [PATCH AUTOSEL 4.4 07/11] net: macb: disable scatter-gather for macb on sama5d3 Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 4.4 08/11] ARM: dts: at91: add new compatibility string " Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 4.4 09/11] floppy: Do not copy a kernel pointer to user memory in FDGETPRM ioctl Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 4.4 10/11] drm/amdgpu: Fix SDMA HQD destroy error on gfx_v7 Sasha Levin
2018-10-05 16:17 ` [PATCH AUTOSEL 4.4 11/11] ubifs: Check for name being NULL while mounting 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=20181005161736.20765-6-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