Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1199887pxa; Thu, 20 Aug 2020 05:28:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+9S5d5LXMkzTxWYKaZ9TALd1FSOHtvcQKIVxXTXdfVVK8GiZ6bcmnJkoWua8oPSvr3Y2D X-Received: by 2002:a17:906:54d3:: with SMTP id c19mr3149496ejp.408.1597926485361; Thu, 20 Aug 2020 05:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597926485; cv=none; d=google.com; s=arc-20160816; b=ij97BSpP6a2+NfH2THweIvep7v+jO2N5N7mX1h6WMjBSq0mEWhDDAHSfz3c9vws1fR DNk1nupsA0c2UqQAGLI2ruisGSIsfwzwHko5zi1N3Tqoxd/gmoS5EqQD9zOuYxTY0BvY Eaek3XiHzGwBtuLiHQ1hm5gHnaqizPW2Z2peWo5319frmrGzznpaGGTS8j+wmFmRQZjg nzGXki2OlpS0Yi0tfMiOOaFvINiBBPq/iWy+eZHSgD22O1pKW42WCwOQa6LVBLdofoob a3Buf1pbNLF6IOnGDpwKp4Q9uL6ANsjwwT34rAXFnGZEhu9eqPyLNP0sLrjH1M72KpKh PQ8w== 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=15/VWuuPRFPuoQYfrwjjW4b4MirUwJrtfBMwTtx2eg0=; b=OMSQE9xh5akTpAzE65I3GCfQfdJfWIo/TzWawztM/av7UXvEAeYS5zHb39syxoJFY7 vXOyDJBB0b0m0tnuAZrlGBgr3hN7SCV3Y3Pw7nat6laWdvg4YH1xcIvK2WJ16OmNb3Ti pzPWC4BQ37qt2nxYZz/SIuqgbyGKv7mfl6OBGLFnI/1Vu8/rH2bwr6JrxFyP4h23uudP NSCNJUuFWUbAguXbX4zSYFYYreklV+gG0xWh5DimA+dsQfl+A0HIaYtQFzPwot1qP7gX ipI2JRLvO06DN+X6ZXDeHC06X4cBJm8SntQ7fJgjA39B6JzjbRzQ+uyLqvtHMSd5BbgR oT3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bx9pUg4u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si1209854edb.410.2020.08.20.05.27.41; Thu, 20 Aug 2020 05:28:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bx9pUg4u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729992AbgHTM1J (ORCPT + 99 others); Thu, 20 Aug 2020 08:27:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:34212 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729998AbgHTJwn (ORCPT ); Thu, 20 Aug 2020 05:52:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 235352078D; Thu, 20 Aug 2020 09:52:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597917162; bh=+cJZlcM/NgebCg4g4alyqMpOi4jxxplSXRxhi68G4Og=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bx9pUg4uAsfefIi9l9ozpWOPTKwWdy63PYo7XOx7uk7aUxwMtM+bpO6dz6OSpgr/i esVBiIj14mQcUjbA/lpy2sE5Ag2pyq/IMagV0k/LjswsqQirlEaEtXTF0GrILq4HjT mYrsbwBcVFXv16fJ7UroXXMiVAx1Zmf5KKYGCPpY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan McDowell , "David S. Miller" Subject: [PATCH 4.19 26/92] net: stmmac: dwmac1000: provide multicast filter fallback Date: Thu, 20 Aug 2020 11:21:11 +0200 Message-Id: <20200820091538.915149698@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091537.490965042@linuxfoundation.org> References: <20200820091537.490965042@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Jonathan McDowell commit 592d751c1e174df5ff219946908b005eb48934b3 upstream. If we don't have a hardware multicast filter available then instead of silently failing to listen for the requested ethernet broadcast addresses fall back to receiving all multicast packets, in a similar fashion to other drivers with no multicast filter. Cc: stable@vger.kernel.org Signed-off-by: Jonathan McDowell Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c @@ -176,6 +176,9 @@ static void dwmac1000_set_filter(struct value = GMAC_FRAME_FILTER_PR; } else if (dev->flags & IFF_ALLMULTI) { value = GMAC_FRAME_FILTER_PM; /* pass all multi */ + } else if (!netdev_mc_empty(dev) && (mcbitslog2 == 0)) { + /* Fall back to all multicast if we've no filter */ + value = GMAC_FRAME_FILTER_PM; } else if (!netdev_mc_empty(dev)) { struct netdev_hw_addr *ha;