netdev.vger.kernel.org archive mirror
 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>, "Petr Štetiar" <ynezz@true.cz>,
	YueHaibing <yuehaibing@huawei.com>,
	"Dan Carpenter" <dan.carpenter@oracle.com>,
	"Yang Wei" <yang.wei9@zte.com.cn>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] net: ll_temac: Cleanup multicast filter on change
Date: Thu, 23 May 2019 14:02:21 +0200	[thread overview]
Message-ID: <20190523120222.3807-4-esben@geanix.com> (raw)
In-Reply-To: <20190523120222.3807-1-esben@geanix.com>

Avoid leaving old address table entries when using multicast.  If more than
one multicast address were removed, only the first removed address would
actually be cleared.

Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 drivers/net/ethernet/xilinx/ll_temac_main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 9d43be3..75da604 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -484,10 +484,13 @@ static void temac_set_multicast_list(struct net_device *ndev)
 						    multi_addr_lsw);
 			i++;
 		}
-	} else {
+	}
+
+	/* Clear all or remaining/unused address table entries */
+	while (i < MULTICAST_CAM_TABLE_NUM) {
 		temac_indirect_out32_locked(lp, XTE_MAW0_OFFSET, 0);
 		temac_indirect_out32_locked(lp, XTE_MAW1_OFFSET, i << 16);
-		}
+		i++;
 	}
 
 	/* Enable address filter block if currently disabled */
-- 
2.4.11


  parent 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 ` [PATCH 1/4] net: ll_temac: Do not make promiscuous mode sticky on multicast Esben Haabendal
2019-05-23 12:02 ` [PATCH 2/4] net: ll_temac: Prepare indirect register access for multicast support Esben Haabendal
2019-05-23 12:02 ` Esben Haabendal [this message]
2019-05-23 12:02 ` [PATCH 4/4] net: ll_temac: Enable " 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-4-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=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=yang.wei9@zte.com.cn \
    --cc=ynezz@true.cz \
    --cc=yuehaibing@huawei.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).