Skip to content

Commit

Permalink
net: stmmac: dwmac1000: Fix extended MAC address registers definition
Browse files Browse the repository at this point in the history
[ Upstream commit 1adb20f ]

The register starts from 0x800 is the 16th MAC address register rather
than the first one.

Fixes: cffb13f ("stmmac: extend mac addr reg and fix perfect filering")
Signed-off-by: Jisheng Zhang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Jisheng Zhang authored and gregkh committed Jun 23, 2021
1 parent 6392ed8 commit 6a4b399
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ enum power_event {
#define LPI_CTRL_STATUS_TLPIEN 0x00000001 /* Transmit LPI Entry */

/* GMAC HW ADDR regs */
#define GMAC_ADDR_HIGH(reg) (((reg > 15) ? 0x00000800 : 0x00000040) + \
(reg * 8))
#define GMAC_ADDR_LOW(reg) (((reg > 15) ? 0x00000804 : 0x00000044) + \
(reg * 8))
#define GMAC_ADDR_HIGH(reg) ((reg > 15) ? 0x00000800 + (reg - 16) * 8 : \
0x00000040 + (reg * 8))
#define GMAC_ADDR_LOW(reg) ((reg > 15) ? 0x00000804 + (reg - 16) * 8 : \
0x00000044 + (reg * 8))
#define GMAC_MAX_PERFECT_ADDRESSES 1

#define GMAC_PCS_BASE 0x000000c0 /* PCS register base */
Expand Down

0 comments on commit 6a4b399

Please sign in to comment.