From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
linux-kernel@vger.kernel.org (open list),
davem@davemloft.net, kuba@kernel.org
Subject: [PATCH net 3/4] net: dsa: b53: Fix ARL register definitions
Date: Mon, 13 Apr 2020 21:16:29 -0700 [thread overview]
Message-ID: <20200414041630.5740-4-f.fainelli@gmail.com> (raw)
In-Reply-To: <20200414041630.5740-1-f.fainelli@gmail.com>
The ARL {MAC,VID} tuple and the forward entry were off by 0x10 bytes,
which means that when we read/wrote from/to ARL bin index 0, we were
actually accessing the ARLA_RWCTRL register.
Fixes: 1da6df85c6fb ("net: dsa: b53: Implement ARL add/del/dump operations")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/b53/b53_regs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h
index 2a9f421680aa..d914e756cdab 100644
--- a/drivers/net/dsa/b53/b53_regs.h
+++ b/drivers/net/dsa/b53/b53_regs.h
@@ -304,7 +304,7 @@
*
* BCM5325 and BCM5365 share most definitions below
*/
-#define B53_ARLTBL_MAC_VID_ENTRY(n) (0x10 * (n))
+#define B53_ARLTBL_MAC_VID_ENTRY(n) ((0x10 * (n)) + 0x10)
#define ARLTBL_MAC_MASK 0xffffffffffffULL
#define ARLTBL_VID_S 48
#define ARLTBL_VID_MASK_25 0xff
@@ -316,7 +316,7 @@
#define ARLTBL_VALID_25 BIT(63)
/* ARL Table Data Entry N Registers (32 bit) */
-#define B53_ARLTBL_DATA_ENTRY(n) ((0x10 * (n)) + 0x08)
+#define B53_ARLTBL_DATA_ENTRY(n) ((0x10 * (n)) + 0x18)
#define ARLTBL_DATA_PORT_ID_MASK 0x1ff
#define ARLTBL_TC(tc) ((3 & tc) << 11)
#define ARLTBL_AGE BIT(14)
--
2.17.1
next prev parent reply other threads:[~2020-04-14 4:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 4:16 [PATCH net 0/4] net: dsa: b53: Various ARL fixes Florian Fainelli
2020-04-14 4:16 ` [PATCH net 1/4] net: dsa: b53: Lookup VID in ARL searches when VLAN is enabled Florian Fainelli
2020-04-14 14:03 ` Andrew Lunn
2020-04-14 4:16 ` [PATCH net 2/4] net: dsa: b53: Fix valid setting for MDB entries Florian Fainelli
2020-04-14 14:06 ` Andrew Lunn
2020-04-14 4:16 ` Florian Fainelli [this message]
2020-04-14 14:07 ` [PATCH net 3/4] net: dsa: b53: Fix ARL register definitions Andrew Lunn
2020-04-14 4:16 ` [PATCH net 4/4] net: dsa: b53: Rework ARL bin logic Florian Fainelli
2020-04-14 14:16 ` Andrew Lunn
2020-04-14 15:47 ` [PATCH net 0/4] net: dsa: b53: Various ARL fixes Florian Fainelli
2020-04-14 23:41 ` David Miller
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=20200414041630.5740-4-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.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;
as well as URLs for NNTP newsgroup(s).