Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1669286ybm; Thu, 23 May 2019 05:04:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwy+ARPBuVhpTD1IDnZqhpeKCyinXS+XQ1/d2B1XB9z0Ve3BUbjlQHIAFxBJH+qEGyOeAul X-Received: by 2002:a65:64d5:: with SMTP id t21mr23080385pgv.310.1558613089447; Thu, 23 May 2019 05:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558613089; cv=none; d=google.com; s=arc-20160816; b=VdBkK8krtvjp5LzazV2uuRW1VQBSc4ZSr/aaaZHHCW+lDb+mTpYU/23oAZXX1ZFlVF 8mKrvdL4jcH3R+pwULtX2Fo42Zm6dWS85Aow+26xof969dVM9JOuZD8fjKqOGwR3DVmb APPP13vBfpXN939uOPyVBjRwItPDl0tL6VEG5XbUICnakA8wgdw79a1Zy+qzLM21g2OT bLj2/MxtWb5oBICxsOqZ2uPWtnwtEh3A1FOe4e1fc0K0QwXLYq2XX3uzfwpsBnTWyXKk lLkui4r8CsZsQxAEwwMDmWTQi2v7H70i2i+wvKOhnFb95VwSzA48aM266f0LEzCPxOZK wDkg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kGuUq00EUCmU+BS1A2iNcWwM7aer1uAUYHhKzNxwWOI=; b=ByIbuZb623+SAFQ3bPtOResPAmc25msWLFfqboz+OUO4iFM6Dp9jefjDCnlT8dRfgp 44+TPVZSzj5aMN0ozwZmDpRjPu2U+HIK87TUCakTwav//8TRFb0qIwr8RcZotO9wSK4T ZLGSWZBgSKm7vquIJiEoapj+bQDSQZMU0QOuhJMXOhoaDKD6M94eyN2cdzviQkmaKUu1 tyU7o8ORM1e53Q+pY5YvD9M+YSQAkA+anVWqmk7Zwu5d0N/S1MSdvP75V5edD7RGeLHI MMHeifj17rPV+1XINj7ytNmxtG38C90dvjmnOJsm56l6HPdOgCbqQVogPAo6PRwA/26k A7oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@geanix.com header.s=first header.b=QRLMv9AM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=geanix.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a128si28914251pgc.242.2019.05.23.05.04.32; Thu, 23 May 2019 05:04:49 -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=@geanix.com header.s=first header.b=QRLMv9AM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=geanix.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730659AbfEWMCa (ORCPT + 99 others); Thu, 23 May 2019 08:02:30 -0400 Received: from first.geanix.com ([116.203.34.67]:60910 "EHLO first.geanix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728309AbfEWMC2 (ORCPT ); Thu, 23 May 2019 08:02:28 -0400 Received: from localhost (unknown [193.163.1.7]) by first.geanix.com (Postfix) with ESMTPSA id 649FD1162; Thu, 23 May 2019 12:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1558612896; bh=MDlnZg47ZOo1eOdvw026imEu0K7kavspLfqysAaRDCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QRLMv9AMR6yu/5Zzc8RgovsdLZC8PkNs4o1vvs97Tip96nUDXnGrxhI+t4E2XBpK4 TcgfJAWHa/HoNDWGwUPckipLHoyGZGRSYJj6s2WEqEUb227PV4B3RjGNlGQ/TMNNdx nIXZAT5C7KzyR30A6xm7oSnjOGQVWEcFEHHUOpkzwUQr0s3YGYgj/dWxgJezu4mPRg WZs0/oYLnbysyqF2Eyk7bkJNK+IRDud3+9lyZH6yCeQkMlXJsyFo2MuTOk0J+wtSUP pf8RuHPNZoJylFBGaz+NhHV6ckgChrz186NTPFphOQV6PBmEzb2kIe5W3L5eJDxZhs vrrIX6uTdWSSg== From: Esben Haabendal To: netdev@vger.kernel.org Cc: "David S. Miller" , Michal Simek , Andrew Lunn , YueHaibing , =?UTF-8?q?Petr=20=C5=A0tetiar?= , Luis Chamberlain , Dan Carpenter , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] net: ll_temac: Do not make promiscuous mode sticky on multicast Date: Thu, 23 May 2019 14:02:19 +0200 Message-Id: <20190523120222.3807-2-esben@geanix.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523120222.3807-1-esben@geanix.com> References: <20190523120222.3807-1-esben@geanix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on 796779db2bec Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When user has requested IFF_ALLMULTI or have set more than 4 multicast addresses, we should just use promiscuous mode, but not set it in flags, as it causes the interface to stay in promiscuous mode even when the non-IFF_PROMISC condition that caused promiscuous mode to be enabled has gone away. Signed-off-by: Esben Haabendal --- drivers/net/ethernet/xilinx/ll_temac_main.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index 47c4515..05195ff 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c @@ -388,13 +388,6 @@ static void temac_set_multicast_list(struct net_device *ndev) mutex_lock(lp->indirect_mutex); if (ndev->flags & (IFF_ALLMULTI | IFF_PROMISC) || netdev_mc_count(ndev) > MULTICAST_CAM_TABLE_NUM) { - /* - * We must make the kernel realise we had to move - * into promisc mode or we start all out war on - * the cable. If it was a promisc request the - * flag is already set. If not we assert it. - */ - ndev->flags |= IFF_PROMISC; temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK); dev_info(&ndev->dev, "Promiscuous mode enabled.\n"); } else if (!netdev_mc_empty(ndev)) { -- 2.4.11