From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45FA534A76F; Tue, 16 Dec 2025 11:59:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765886379; cv=none; b=reoTc7uoenesV/5f71xJJuQyibvyIT70sz2ve7k+H9zJ7QtG0LOIhcd8UPTRSw5oJOx/YkTSN5faVgrNEgsu79uVFVCPRGGI6NAdhc64a5a2xcL1HOO9Uk8Y8D0AX71J1MRnsY3ZZcMugG1Xc+uwrIlZTxcg7wRoJ7WTGbFMYCc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765886379; c=relaxed/simple; bh=Fr1QEZwFbQLRtk0w3g/dh5gFTcLXsq5y077fyPEGdpE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iLYbSSOlZGKXMBEHbYT0n6xb5kX5JZmdrJn2YmW3982hG61rF/j+raTT6x173p1qBjjEJbtnMbbSQBJZV1x3aHGUWCw7zoGOJj/aP03gTQvsALS5N20L28zL10U3dN8OAB/L9YAh4Fwr4GrCj3NByF57xpmFRKVAB6WEwuKxZYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=D25hMXdY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="D25hMXdY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A86E5C16AAE; Tue, 16 Dec 2025 11:59:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765886379; bh=Fr1QEZwFbQLRtk0w3g/dh5gFTcLXsq5y077fyPEGdpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D25hMXdYS5jAYDXPR8UIyroZBh5S8NHuY2neYW9DZacY77XFESjxSxAJYHd6PucWm hgQf05NJujmQ8KcBkmTsAdozAz1nIFo/NVlkLU8ILDWmU5q2IrGdusCVGwNWpsK4gm o3fqF5+P6wbO3SVFRImgG94aWRKOjd3M/4dvdM3g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Fainelli , =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= , Jonas Gorski , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.17 418/507] net: dsa: b53: use same ARL search result offset for BCM5325/65 Date: Tue, 16 Dec 2025 12:14:19 +0100 Message-ID: <20251216111400.605149435@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251216111345.522190956@linuxfoundation.org> References: <20251216111345.522190956@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jonas Gorski [ Upstream commit 8e46aacea4264bcb8d4265fb07577afff58ae78d ] 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: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365") Reviewed-by: Florian Fainelli Tested-by: Álvaro Fernández Rojas Signed-off-by: Jonas Gorski Link: https://patch.msgid.link/20251128080625.27181-4-jonas.gorski@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/dsa/b53/b53_common.c | 18 +----------------- drivers/net/dsa/b53/b53_regs.h | 4 +--- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index dedbd53412871..68e9162087ab4 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -2093,16 +2093,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) { @@ -2699,12 +2689,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, @@ -2761,7 +2745,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, diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h index d9026cf865549..f2a3696d122fa 100644 --- a/drivers/net/dsa/b53/b53_regs.h +++ b/drivers/net/dsa/b53/b53_regs.h @@ -370,10 +370,8 @@ #define B53_ARL_SRCH_RSTL_0_MACVID 0x60 #define B53_ARL_SRCH_RSLT_MACVID_89 0x33 -/* 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 -- 2.51.0