LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Esben Haabendal <esben@geanix.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	YueHaibing <yuehaibing@huawei.com>,
	"Petr Štetiar" <ynezz@true.cz>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	"Dan Carpenter" <dan.carpenter@oracle.com>,
	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	[thread overview]
Message-ID: <20190523120222.3807-2-esben@geanix.com> (raw)
In-Reply-To: <20190523120222.3807-1-esben@geanix.com>

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 <esben@geanix.com>
---
 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


  reply	other threads:[~2019-05-23 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 12:02 [PATCH 0/4] net: ll_temac: Fix and enable multicast support Esben Haabendal
2019-05-23 12:02 ` Esben Haabendal [this message]
2019-05-23 12:02 ` [PATCH 2/4] net: ll_temac: Prepare indirect register access for " Esben Haabendal
2019-05-23 12:02 ` [PATCH 3/4] net: ll_temac: Cleanup multicast filter on change Esben Haabendal
2019-05-23 12:02 ` [PATCH 4/4] net: ll_temac: Enable multicast support Esben Haabendal
2019-05-23 16:34 ` [PATCH 0/4] net: ll_temac: Fix and enable " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190523120222.3807-2-esben@geanix.com \
    --to=esben@geanix.com \
    --cc=andrew@lunn.ch \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=ynezz@true.cz \
    --cc=yuehaibing@huawei.com \
    --subject='Re: [PATCH 1/4] net: ll_temac: Do not make promiscuous mode sticky on multicast' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).