From: Florian Fainelli <florian.fainelli@broadcom.com>
To: "Álvaro Fernández Rojas" <noltari@gmail.com>,
jonas.gorski@gmail.com, florian.fainelli@broadcom.com,
andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
vivien.didelot@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, dgcbueu@gmail.com
Subject: Re: [RFC PATCH net-next v2 01/10] net: dsa: b53: add support for FDB operations on 5325/5365
Date: Tue, 3 Jun 2025 15:10:04 -0700 [thread overview]
Message-ID: <507a09f6-8b6e-4800-8c90-f2b1662cafa2@broadcom.com> (raw)
In-Reply-To: <20250603204858.72402-2-noltari@gmail.com>
On 6/3/25 13:48, Álvaro Fernández Rojas wrote:
> From: Florian Fainelli <f.fainelli@gmail.com>
>
> BCM5325 and BCM5365 are part of a much older generation of switches which,
> due to their limited number of ports and VLAN entries (up to 256) allowed
> a single 64-bit register to hold a full ARL entry.
> This requires a little bit of massaging when reading, writing and
> converting ARL entries in both directions.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
[snip]
> static int b53_arl_op(struct b53_device *dev, int op, int port,
> const unsigned char *addr, u16 vid, bool is_valid)
> {
> @@ -1795,14 +1834,18 @@ static int b53_arl_op(struct b53_device *dev, int op, int port,
>
> /* Perform a read for the given MAC and VID */
> b53_write48(dev, B53_ARLIO_PAGE, B53_MAC_ADDR_IDX, mac);
> - b53_write16(dev, B53_ARLIO_PAGE, B53_VLAN_ID_IDX, vid);
> + if (!is5325(dev))
> + b53_write16(dev, B53_ARLIO_PAGE, B53_VLAN_ID_IDX, vid);
I used the 5325M-DS113-RDS datasheet for this code initially but the
5325E-DS14-R datasheet shows that this register is defined. It's not
clear to me how to differentiate the two kinds of switches. The 5325M
would report itself as:
0x00406330
in the integrated PHY PHYSID1/2 registers, whereas a 5325E would report
itself as 0x0143bc30. Maybe we can use that to key off the very first
generation 5325 switches?
--
Florian
next prev parent reply other threads:[~2025-06-03 22:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 20:48 [RFC PATCH net-next v2 00/10] net: dsa: b53: fix BCM5325 support Álvaro Fernández Rojas
2025-06-03 20:48 ` [RFC PATCH net-next v2 01/10] net: dsa: b53: add support for FDB operations on 5325/5365 Álvaro Fernández Rojas
2025-06-03 22:10 ` Florian Fainelli [this message]
2025-06-04 6:32 ` Jonas Gorski
2025-06-11 7:55 ` Álvaro Fernández Rojas
2025-06-03 20:48 ` [RFC PATCH net-next v2 02/10] net: dsa: b53: prevent FAST_AGE access on BCM5325 Álvaro Fernández Rojas
2025-06-03 20:48 ` [RFC PATCH net-next v2 03/10] net: dsa: b53: prevent SWITCH_CTRL " Álvaro Fernández Rojas
2025-06-03 20:48 ` [RFC PATCH net-next v2 04/10] net: dsa: b53: fix IP_MULTICAST_CTRL " Álvaro Fernández Rojas
2025-06-03 20:48 ` [RFC PATCH net-next v2 05/10] net: dsa: b53: prevent DIS_LEARNING access " Álvaro Fernández Rojas
2025-06-03 20:48 ` [RFC PATCH net-next v2 06/10] net: dsa: b53: prevent BRCM_HDR " Álvaro Fernández Rojas
2025-06-04 18:05 ` Jonas Gorski
2025-06-03 20:48 ` [RFC PATCH net-next v2 07/10] net: dsa: b53: prevent GMII_PORT_OVERRIDE_CTRL " Álvaro Fernández Rojas
2025-06-03 20:48 ` [RFC PATCH net-next v2 08/10] net: dsa: b53: fix unicast/multicast flooding " Álvaro Fernández Rojas
2025-06-03 20:48 ` [RFC PATCH net-next v2 09/10] net: dsa: b53: fix b53_imp_vlan_setup for BCM5325 Álvaro Fernández Rojas
2025-06-03 20:48 ` [RFC PATCH net-next v2 10/10] net: dsa: b53: ensure BCM5325 PHYs are enabled Álvaro Fernández Rojas
2025-06-04 18:20 ` Florian Fainelli
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=507a09f6-8b6e-4800-8c90-f2b1662cafa2@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dgcbueu@gmail.com \
--cc=edumazet@google.com \
--cc=jonas.gorski@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=noltari@gmail.com \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.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
all inboxes | Powered by JetHome®