summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/microchip/ksz8795_reg.h
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2024-04-03 14:50:34 +0200
committerJakub Kicinski <kuba@kernel.org>2024-04-04 19:08:42 -0700
commit0499bb09f412fe32ec19659bf10cc5d40e8ff6cb (patch)
tree050743f2486a1bb377ab13f588747627f2e1a7df /drivers/net/dsa/microchip/ksz8795_reg.h
parent860cf29eabf1338ebb692c755387caed49ba06f1 (diff)
downloadlwn-0499bb09f412fe32ec19659bf10cc5d40e8ff6cb.tar.gz
lwn-0499bb09f412fe32ec19659bf10cc5d40e8ff6cb.zip
net: dsa: microchip: ksz8: Refactor ksz8_fdb_dump()
Refactor ksz8_fdb_dump() to address potential issues: - Limit the number of iterations to avoid endless loops. - Handle error codes returned by ksz8_r_dyn_mac_table(), with an exception for -ENXIO when no more dynamic entries are detected. Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com> Link: https://lore.kernel.org/r/20240403125039.3414824-4-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz8795_reg.h')
-rw-r--r--drivers/net/dsa/microchip/ksz8795_reg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz8795_reg.h b/drivers/net/dsa/microchip/ksz8795_reg.h
index 7c9341ef73b0..0d13a6e29b0e 100644
--- a/drivers/net/dsa/microchip/ksz8795_reg.h
+++ b/drivers/net/dsa/microchip/ksz8795_reg.h
@@ -794,5 +794,6 @@
#define TAIL_TAG_LOOKUP BIT(7)
#define FID_ENTRIES 128
+#define KSZ8_DYN_MAC_ENTRIES 1024
#endif