Skip to content

Commit c2e77a1

Browse files
ffainellidavem330
authored andcommitted
net: dsa: b53: Fix ARL register definitions
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: 1da6df8 ("net: dsa: b53: Implement ARL add/del/dump operations") Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent eab167f commit c2e77a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/dsa/b53/b53_regs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@
304304
*
305305
* BCM5325 and BCM5365 share most definitions below
306306
*/
307-
#define B53_ARLTBL_MAC_VID_ENTRY(n) (0x10 * (n))
307+
#define B53_ARLTBL_MAC_VID_ENTRY(n) ((0x10 * (n)) + 0x10)
308308
#define ARLTBL_MAC_MASK 0xffffffffffffULL
309309
#define ARLTBL_VID_S 48
310310
#define ARLTBL_VID_MASK_25 0xff
@@ -316,7 +316,7 @@
316316
#define ARLTBL_VALID_25 BIT(63)
317317

318318
/* ARL Table Data Entry N Registers (32 bit) */
319-
#define B53_ARLTBL_DATA_ENTRY(n) ((0x10 * (n)) + 0x08)
319+
#define B53_ARLTBL_DATA_ENTRY(n) ((0x10 * (n)) + 0x18)
320320
#define ARLTBL_DATA_PORT_ID_MASK 0x1ff
321321
#define ARLTBL_TC(tc) ((3 & tc) << 11)
322322
#define ARLTBL_AGE BIT(14)

0 commit comments

Comments
 (0)