From patchwork Wed Aug 12 19:37:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan McDowell X-Patchwork-Id: 11711273 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C080722 for ; Wed, 12 Aug 2020 19:38:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14CD3206DA for ; Wed, 12 Aug 2020 19:38:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BevAuLg+"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=earth.li header.i=@earth.li header.b="E1kL5RqK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14CD3206DA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=earth.li Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yGW69D/5LXaGrmGH5CAbHy0z61TE59M09bja0znkWbI=; b=BevAuLg+cP57U6bjaP4Ma4Ghc5 XIGbTt10Bx9CqpDto14IKDb/Qke/Gqaf3QOej2LtahfrQ+EfW+HMYJhQ9AKzv5lhWfKgX1JbP02TK fjl6hExRzkHtVX0MrqULYZWcYOo9MH7dQQy+6IzJp9gVWit/WgP0hM68SbaQAf+5l9IBhlNDHWR5h Gt8sj5RSfnTdQWqCVSO39meLYLIKoiSERxZFW+B1U3vG6WApUHEWQU0UUXSRp/kfkwDEqmvso1gJF rZ3cwGSPI/zDK0GR3fneyhdWlN8/YwzA9CGnv/ELRTu+ZOExdMZlCjmVa3c/KKR3hmB8nIXeHipeT QgR45hJA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5wYf-0004G8-Jp; Wed, 12 Aug 2020 19:37:09 +0000 Received: from the.earth.li ([2a00:1098:86:4d:c0ff:ee:15:900d]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5wYb-0004Eq-NA for linux-arm-kernel@lists.infradead.org; Wed, 12 Aug 2020 19:37:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li; s=the; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject :To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6upE0YaOoO/ag38SB8jo+t0fs4seFaLVaVB2MuIhyRw=; b=E1kL5RqKGQWYpR7ND0VkADIj1F KJCusvkNuLbJx2hVqFN46suMqIlBCzYiKjFpzUbHjcihWcoFA21KUcBy7GTNELseJwlTCwnQ5OLY2 1QT7giubWcyjXdRYglUT+dxmvkiamvQLk3+gQ+LmkwEr3lUMYCEtnJafqEtt4BU1PNKTDp/OWGK0x LRvoHRE4I1reJ2ZbB59xxdLjZmunDwi5+SG99hOeXJB8cIDldoIGsmOdF4+zMDddsDB0e19zf4COG NGXmk+g8TfPrdjgHZoFDaz10Q9+ppE9wvcXna+DLR41B/zXk7jRegdbUH2DFgy6sivsMEvFmenQbP T9Y5ZOPw==; Received: from noodles by the.earth.li with local (Exim 4.92) (envelope-from ) id 1k5wYX-0002o7-HJ; Wed, 12 Aug 2020 20:37:01 +0100 Date: Wed, 12 Aug 2020 20:37:01 +0100 From: Jonathan McDowell To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , David Miller , Jakub Kicinski , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net 1/2] net: stmmac: dwmac1000: provide multicast filter fallback Message-ID: <69708c8942a1f3717d15da861609344bd9a16bae.1597260787.git.noodles@earth.li> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200812_153705_833130_98002B0E X-CRM114-Status: GOOD ( 12.96 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 --- drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c index efc6ec1b8027..fc8759f146c7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c @@ -164,6 +164,9 @@ static void dwmac1000_set_filter(struct mac_device_info *hw, value = GMAC_FRAME_FILTER_PR | GMAC_FRAME_FILTER_PCF; } 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;