Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2235519imm; Thu, 18 Oct 2018 11:09:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV63KCnuusBJqWtUJkGCznG5N4VATGPCTNPz4lnmz4eOKNIfbQagKQjO764DffTX8EkwSt58M X-Received: by 2002:a62:8685:: with SMTP id x127-v6mr8215064pfd.252.1539886145234; Thu, 18 Oct 2018 11:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539886145; cv=none; d=google.com; s=arc-20160816; b=RCwHRLauPmM3lX3iaCC7mPFHbWzdxPTnEMd0B8c0bpx4V2uLE9OxRfBg1KS4VTOORp Uk9i2uaLpe9l3ThGXYT2g3hLT2iiUNsDX643kdwnJmM205A+g+/ZlWnFC5y8tyffc1N0 xV74yh/RvHOFIuI13X31UAq41CRTeoT5BLrgKLKA9aiJjnnjyKLi+XgEF1fkR07q6Mwb BXy7KQTuF62ILWuKLl36/xx5Fhv1lfn4os1mT0ds9bd5GwMMbVD9WOEffPtItrK1WMty SCMHpOLKCHR3qfydxqgAzf4gOuPKJE3N12D1NWmGo77CoL4S/MziZRCnC22ufx3VNw0G K5Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=V5WFAhefnIybYl1LycQ/fEHGB0e9jYvPYij3OWNH1io=; b=fn6R55MHin8Co1BR6mEeGNUQ/WphBtXaeyt8NKvHljDKQhabDJHgbCHjD1cMm3KG93 rxyXQAduwp4QUem9Xu4wkByft/pFWz86AGQVx1Lffbv+ZJ3ZWs1iJJLeJNnK9LECG/65 xANSoIa/3GDrfKuq2D3ta4mg+NsYFAd5isxZAHA+at3qSZTNoL1ZpOtHdzx10fg3uMIP BJxXKgexskAht/UCGi29fBcDMgmbTfgi9qBrnoBp7OotG5TvNKfmq58HYGHdYFgjT6Z1 R0yorqJHyULkqA74bU4grNobK3zbTatsyeXYkj/KEIw8h7D2R/Yitald0oGOHn5ESKQ4 x2Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YcsDLSIn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12-v6si23171636pga.81.2018.10.18.11.08.49; Thu, 18 Oct 2018 11:09:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YcsDLSIn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730466AbeJSCId (ORCPT + 99 others); Thu, 18 Oct 2018 22:08:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:57606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726822AbeJSCIc (ORCPT ); Thu, 18 Oct 2018 22:08:32 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9429B2148D; Thu, 18 Oct 2018 18:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885985; bh=AvTS7hOrVERJHD0VqbXQ5enuITikWULTXG75nvLAL7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YcsDLSInkfx4YqGdA0zZU0mWYnADe3uHn9BP0wMMxZWhimnlBmswZ0HY3LfhUvq8E 6gabIoshqDWjjK+nvmQsjVvm6Elg04EOEJGxVrYCMS2dVaF+EJKLZmTN9v0QrYkYHz 0MO3kPnRnYIZ0nQAqnZn/BR/Ois42xuWuAW1R6rY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jongsung Kim , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 06/48] stmmac: fix valid numbers of unicast filter entries Date: Thu, 18 Oct 2018 19:54:41 +0200 Message-Id: <20181018175428.231596073@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175427.133690306@linuxfoundation.org> References: <20181018175427.133690306@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jongsung Kim [ 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- 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 * 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_entr int x = ucast_entries; switch (x) { - case 1: - case 32: + case 1 ... 32: case 64: case 128: break;