Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5457907imm; Tue, 16 Oct 2018 10:31:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV63pO9gOOIuIwjDV2Jg22lAZs3ny5h9tJYbVY1AypvLKPlgmaXUs36q+WuX47I/COuU9i/MC X-Received: by 2002:a63:9612:: with SMTP id c18-v6mr20352771pge.21.1539711076359; Tue, 16 Oct 2018 10:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539711076; cv=none; d=google.com; s=arc-20160816; b=PPcxVvbjU3XDJtPP4lT8BVh6ZHEGBEts3iISSIPzzkU/Sw+P7P4J7O8UNOVvtvkA0Y BSgKFfbNEF5MI1vf6qOmvzqdj0+3ohIQARdLxsITytPtgAWQUO70kiGnqKHdJuKJrC61 8X66Sbiha5JLfhb7R7KA4On5SbgEfJ/QagsUFwJla6SBt1Tg7tP0Oj6NRdIFBPO3lvVw bJH1R5mytkHuDHB4xpRp1ZB1QYu3Bcgbbr0eSWk2quu5bWFUyKApibg+NEhKbKtGipLr ThqUGel4K8yGNhSoU6WVFogqPnZ78SdK4iigkfNW/WkrlODZ04m338fwgQeUWIgrmdcu J6rA== 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=Ql0PmbwzvzoWFn7EiG+k4cDA5bvg3C9OMal6uEf+2KQ=; b=XbHfKViciA6ZhKVzOKIv9rDf8raL8LnlsxAZb6uiTjl6l0m65CF/os5osmEL37iq8c aa3PMQ+EMRrGh+HWrFAGyGi9iqwGy9uEAugVAB+QnHmggHgHb2fzZ6sLVjAk7nkulf0C Q3/JmBqRR2/grwgR7qJmH/4NAozM+0lD1eOD2yrUCa4IzU7pP63+gi4U56dTZSweL31I W3F5eOLZAnMFKB0sDu9t9VOVW4HvLH4hRhmF2yfLPXOB3/UU5ycTPT/D08L0Xd/ZUSlq 9edin8zchn6kU1QWMQRr6VRVMhJef9132xPxklhnHZAtd+w5XZ/Y/FEWFFwMvL94GA87 u8vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WDuAe0GQ; 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 3-v6si14790645plp.173.2018.10.16.10.31.00; Tue, 16 Oct 2018 10:31:16 -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=WDuAe0GQ; 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 S1731674AbeJQBPw (ORCPT + 99 others); Tue, 16 Oct 2018 21:15:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:34526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730396AbeJQBPu (ORCPT ); Tue, 16 Oct 2018 21:15:50 -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 55C7320658; Tue, 16 Oct 2018 17:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539710664; bh=H29PVWSENl9sKLtTUEXPR2BqxOgp6G7eAaN7z4vSg2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WDuAe0GQ0FT2nqRfeSmkpFKirKMLE2UA/5/rmWqWyEqRTCk/kbkr6c7c9lFnGSsWB eKNIKb8bhbT2f0OVubx0zHCmjyRiFps048ZW/DD+Ua5/TwMluOD+LKnyXTEfrjl6D4 1ocCcLEC7XBoGsLGYNCNbLm4v4ys8flOYF7t5MJc= 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.9 09/71] stmmac: fix valid numbers of unicast filter entries Date: Tue, 16 Oct 2018 19:09:06 +0200 Message-Id: <20181016170539.868924013@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016170539.315587743@linuxfoundation.org> References: <20181016170539.315587743@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.9-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;