mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-02 07:00:42 -04:00
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: c45655386e ("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>
This commit is contained in:
committed by
Jakub Kicinski
parent
9316012dd0
commit
8e46aacea4
@@ -2125,16 +2125,6 @@ static void b53_arl_search_read_25(struct b53_device *dev, u8 idx,
|
||||
b53_arl_to_entry_25(ent, mac_vid);
|
||||
}
|
||||
|
||||
static void b53_arl_search_read_65(struct b53_device *dev, u8 idx,
|
||||
struct b53_arl_entry *ent)
|
||||
{
|
||||
u64 mac_vid;
|
||||
|
||||
b53_read64(dev, B53_ARLIO_PAGE, B53_ARL_SRCH_RSTL_0_MACVID_65,
|
||||
&mac_vid);
|
||||
b53_arl_to_entry_25(ent, mac_vid);
|
||||
}
|
||||
|
||||
static void b53_arl_search_read_89(struct b53_device *dev, u8 idx,
|
||||
struct b53_arl_entry *ent)
|
||||
{
|
||||
@@ -2746,12 +2736,6 @@ static const struct b53_arl_ops b53_arl_ops_25 = {
|
||||
.arl_search_read = b53_arl_search_read_25,
|
||||
};
|
||||
|
||||
static const struct b53_arl_ops b53_arl_ops_65 = {
|
||||
.arl_read_entry = b53_arl_read_entry_25,
|
||||
.arl_write_entry = b53_arl_write_entry_25,
|
||||
.arl_search_read = b53_arl_search_read_65,
|
||||
};
|
||||
|
||||
static const struct b53_arl_ops b53_arl_ops_89 = {
|
||||
.arl_read_entry = b53_arl_read_entry_89,
|
||||
.arl_write_entry = b53_arl_write_entry_89,
|
||||
@@ -2814,7 +2798,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
|
||||
.arl_buckets = 1024,
|
||||
.imp_port = 5,
|
||||
.duplex_reg = B53_DUPLEX_STAT_FE,
|
||||
.arl_ops = &b53_arl_ops_65,
|
||||
.arl_ops = &b53_arl_ops_25,
|
||||
},
|
||||
{
|
||||
.chip_id = BCM5389_DEVICE_ID,
|
||||
|
||||
@@ -376,10 +376,8 @@
|
||||
#define B53_ARL_SRCH_RSLT_MACVID_89 0x33
|
||||
#define B53_ARL_SRCH_RSLT_MACVID_63XX 0x34
|
||||
|
||||
/* Single register search result on 5325 */
|
||||
/* Single register search result on 5325/5365 */
|
||||
#define B53_ARL_SRCH_RSTL_0_MACVID_25 0x24
|
||||
/* Single register search result on 5365 */
|
||||
#define B53_ARL_SRCH_RSTL_0_MACVID_65 0x30
|
||||
|
||||
/* ARL Search Data Result (32 bit) */
|
||||
#define B53_ARL_SRCH_RSTL_0 0x68
|
||||
|
||||
Reference in New Issue
Block a user