Skip to content

Commit 21d0fc9

Browse files
claudiu-mkuba-moo
authored andcommitted
net: enetc: Convert 16-bit register writes to 32-bit for ENETC v4
For ENETC v4, which is integrated into more complex SoCs (compared to v1), 16‑bit register writes are blocked in the SoC interconnect on some chips. To be fair, it is not recommended to access 32‑bit registers of this IP using lower‑width accessors (i.e. 16‑bit), and the only exception to this rule was introduced by me in the initial ENETC v1 driver for the PMAR1 register, which holds the lower 16 bits of the primary MAC address of an SI. Meanwhile, this exception has been replicated for v4 as well. Since LS1028 (the only SoC with ENETC v1) is not affected by this issue, the current patch fixes the 16‑bit writes to PMAR1 starting with ENETC v4. Fixes: 99100d0 ("net: enetc: add preliminary support for i.MX95 ENETC PF") Signed-off-by: Claudiu Manoil <[email protected]> Reviewed-by: Wei Fang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9ae13b2 commit 21d0fc9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/net/ethernet/freescale/enetc/enetc4_pf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ static void enetc4_pf_set_si_primary_mac(struct enetc_hw *hw, int si,
5959

6060
if (si != 0) {
6161
__raw_writel(upper, hw->port + ENETC4_PSIPMAR0(si));
62-
__raw_writew(lower, hw->port + ENETC4_PSIPMAR1(si));
62+
__raw_writel(lower, hw->port + ENETC4_PSIPMAR1(si));
6363
} else {
6464
__raw_writel(upper, hw->port + ENETC4_PMAR0);
65-
__raw_writew(lower, hw->port + ENETC4_PMAR1);
65+
__raw_writel(lower, hw->port + ENETC4_PMAR1);
6666
}
6767
}
6868

0 commit comments

Comments
 (0)