netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net] net: dsa: microchip: ksz9477: port map correction in ALU table entry register
@ 2023-01-18 17:47 Rakesh Sankaranarayanan
  2023-01-19 17:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Rakesh Sankaranarayanan @ 2023-01-18 17:47 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: woojung.huh, UNGLinuxDriver, andrew, f.fainelli, olteanv, davem,
	edumazet, kuba, pabeni

ALU table entry 2 register in KSZ9477 have bit positions reserved for
forwarding port map. This field is referred in ksz9477_fdb_del() for
clearing forward port map and alu table.

But current fdb_del refer ALU table entry 3 register for accessing forward
port map. Update ksz9477_fdb_del() to get forward port map from correct
alu table entry register.

With this bug, issue can be observed while deleting static MAC entries.
Delete any specific MAC entry using "bridge fdb del" command. This should
clear all the specified MAC entries. But it is observed that entries with
self static alone are retained.

Tested on LAN9370 EVB since ksz9477_fdb_del() is used common across
LAN937x and KSZ series.

Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477")
Signed-off-by: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

---

v1->v2
- Based on the community feedback, removed patch from series and
  added as independent patch.
- Added Reviewed-by tag.

---
---
 drivers/net/dsa/microchip/ksz9477.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index 47b54ecf2c6f..6178a96e389f 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -540,10 +540,10 @@ int ksz9477_fdb_del(struct ksz_device *dev, int port,
 		ksz_read32(dev, REG_SW_ALU_VAL_D, &alu_table[3]);
 
 		/* clear forwarding port */
-		alu_table[2] &= ~BIT(port);
+		alu_table[1] &= ~BIT(port);
 
 		/* if there is no port to forward, clear table */
-		if ((alu_table[2] & ALU_V_PORT_MAP) == 0) {
+		if ((alu_table[1] & ALU_V_PORT_MAP) == 0) {
 			alu_table[0] = 0;
 			alu_table[1] = 0;
 			alu_table[2] = 0;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 net] net: dsa: microchip: ksz9477: port map correction in ALU table entry register
  2023-01-18 17:47 [PATCH v2 net] net: dsa: microchip: ksz9477: port map correction in ALU table entry register Rakesh Sankaranarayanan
@ 2023-01-19 17:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-19 17:40 UTC (permalink / raw)
  To: Rakesh Sankaranarayanan
  Cc: netdev, linux-kernel, woojung.huh, UNGLinuxDriver, andrew,
	f.fainelli, olteanv, davem, edumazet, kuba, pabeni

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 18 Jan 2023 23:17:35 +0530 you wrote:
> ALU table entry 2 register in KSZ9477 have bit positions reserved for
> forwarding port map. This field is referred in ksz9477_fdb_del() for
> clearing forward port map and alu table.
> 
> But current fdb_del refer ALU table entry 3 register for accessing forward
> port map. Update ksz9477_fdb_del() to get forward port map from correct
> alu table entry register.
> 
> [...]

Here is the summary with links:
  - [v2,net] net: dsa: microchip: ksz9477: port map correction in ALU table entry register
    https://git.kernel.org/netdev/net/c/6c977c5c2e4c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-19 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-18 17:47 [PATCH v2 net] net: dsa: microchip: ksz9477: port map correction in ALU table entry register Rakesh Sankaranarayanan
2023-01-19 17:40 ` patchwork-bot+netdevbpf

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).