Skip to content

Commit 8e46aac

Browse files
KanjiMonsterkuba-moo
authored andcommitted
net: dsa: b53: use same ARL search result offset for BCM5325/65
BCM5365's search result is at the same offset as BCM5325's search result, and they (mostly) share the same format, so switch BCM5365 to BCM5325's arl ops. Fixes: c456553 ("net: dsa: b53: add support for FDB operations on 5325/5365") Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Link: https://patch.msgid.link/20251128080625.27181-4-jonas.gorski@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 9316012 commit 8e46aac

2 files changed

Lines changed: 2 additions & 20 deletions

File tree

drivers/net/dsa/b53/b53_common.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,16 +2125,6 @@ static void b53_arl_search_read_25(struct b53_device *dev, u8 idx,
21252125
b53_arl_to_entry_25(ent, mac_vid);
21262126
}
21272127

2128-
static void b53_arl_search_read_65(struct b53_device *dev, u8 idx,
2129-
struct b53_arl_entry *ent)
2130-
{
2131-
u64 mac_vid;
2132-
2133-
b53_read64(dev, B53_ARLIO_PAGE, B53_ARL_SRCH_RSTL_0_MACVID_65,
2134-
&mac_vid);
2135-
b53_arl_to_entry_25(ent, mac_vid);
2136-
}
2137-
21382128
static void b53_arl_search_read_89(struct b53_device *dev, u8 idx,
21392129
struct b53_arl_entry *ent)
21402130
{
@@ -2746,12 +2736,6 @@ static const struct b53_arl_ops b53_arl_ops_25 = {
27462736
.arl_search_read = b53_arl_search_read_25,
27472737
};
27482738

2749-
static const struct b53_arl_ops b53_arl_ops_65 = {
2750-
.arl_read_entry = b53_arl_read_entry_25,
2751-
.arl_write_entry = b53_arl_write_entry_25,
2752-
.arl_search_read = b53_arl_search_read_65,
2753-
};
2754-
27552739
static const struct b53_arl_ops b53_arl_ops_89 = {
27562740
.arl_read_entry = b53_arl_read_entry_89,
27572741
.arl_write_entry = b53_arl_write_entry_89,
@@ -2814,7 +2798,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
28142798
.arl_buckets = 1024,
28152799
.imp_port = 5,
28162800
.duplex_reg = B53_DUPLEX_STAT_FE,
2817-
.arl_ops = &b53_arl_ops_65,
2801+
.arl_ops = &b53_arl_ops_25,
28182802
},
28192803
{
28202804
.chip_id = BCM5389_DEVICE_ID,

drivers/net/dsa/b53/b53_regs.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,8 @@
376376
#define B53_ARL_SRCH_RSLT_MACVID_89 0x33
377377
#define B53_ARL_SRCH_RSLT_MACVID_63XX 0x34
378378

379-
/* Single register search result on 5325 */
379+
/* Single register search result on 5325/5365 */
380380
#define B53_ARL_SRCH_RSTL_0_MACVID_25 0x24
381-
/* Single register search result on 5365 */
382-
#define B53_ARL_SRCH_RSTL_0_MACVID_65 0x30
383381

384382
/* ARL Search Data Result (32 bit) */
385383
#define B53_ARL_SRCH_RSTL_0 0x68

0 commit comments

Comments
 (0)