From: <Tristram.Ha@microchip.com>
To: Woojung Huh <woojung.huh@microchip.com>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
<UNGLinuxDriver@microchip.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Tristram Ha <tristram.ha@microchip.com>
Subject: [PATCH net] net: dsa: microchip: fix initial port flush problem
Date: Tue, 28 May 2024 14:35:45 -0700 [thread overview]
Message-ID: <1716932145-3486-1-git-send-email-Tristram.Ha@microchip.com> (raw)
From: Tristram Ha <tristram.ha@microchip.com>
The very first flush in any port will flush all learned addresses in all
ports. This can be observed by unplugging a cable from one port while
additional ports are connected and dumping the fdb entries.
This problem is caused by the initially wrong value programmed to the
register. After the first flush the value is reset back to the normal so
the next port flush will not cause such problem again.
Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477")
Signed-off-by: Tristram Ha <tristram.ha@microchip.com>
---
drivers/net/dsa/microchip/ksz9477.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index f8ad7833f5d9..7cc92b90ffea 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -356,8 +356,7 @@ int ksz9477_reset_switch(struct ksz_device *dev)
/* default configuration */
ksz_read8(dev, REG_SW_LUE_CTRL_1, &data8);
- data8 = SW_AGING_ENABLE | SW_LINK_AUTO_AGING |
- SW_SRC_ADDR_FILTER | SW_FLUSH_STP_TABLE | SW_FLUSH_MSTP_TABLE;
+ data8 |= SW_AGING_ENABLE | SW_LINK_AUTO_AGING | SW_SRC_ADDR_FILTER;
ksz_write8(dev, REG_SW_LUE_CTRL_1, data8);
/* disable interrupts */
--
2.34.1
next reply other threads:[~2024-05-28 21:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 21:35 Tristram.Ha [this message]
2024-05-31 19:02 ` [PATCH net] net: dsa: microchip: fix initial port flush problem Simon Horman
2024-05-31 19:19 ` Tristram.Ha
2024-06-01 12:05 ` Simon Horman
2024-06-02 14:01 ` Vladimir Oltean
2024-06-03 7:40 ` Simon Horman
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=1716932145-3486-1-git-send-email-Tristram.Ha@microchip.com \
--to=tristram.ha@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.com \
--cc=woojung.huh@microchip.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).