Skip to content

Commit a7195a3

Browse files
prabhakarladkuba-moo
authored andcommitted
net: pcs: rzn1-miic: Correct MODCTRL register offset
Correct the Mode Control Register (MODCTRL) offset for RZ/N MIIC. According to the R-IN Engine and Ethernet Peripherals Manual (Rev.1.30) [0], Table 10.1 "Ethernet Accessory Register List", MODCTRL is at offset 0x8, not 0x20 as previously defined. Offset 0x20 actually maps to the Port Trigger Control Register (PTCTRL), which controls PTP_MODE[3:0] and RGMII_CLKSEL[4]. Using this incorrect definition prevented the driver from configuring the SW_MODE[4:0] bits in MODCTRL, which control the internal connection of Ethernet ports. As a result, the MIIC could not be switched into the correct mode, leading to link setup failures and non-functional Ethernet ports on affected systems. [0] https://www.renesas.com/en/document/mah/rzn1d-group-rzn1s-group-rzn1l-group-users-manual-r-engine-and-ethernet-peripherals?r=1054571 Fixes: 7dc54d3 ("net: pcs: add Renesas MII converter driver") Cc: [email protected] Signed-off-by: Lad Prabhakar <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Tested-by: Wolfram Sang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d473673 commit a7195a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/pcs/pcs-rzn1-miic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#define MIIC_PRCMD 0x0
2020
#define MIIC_ESID_CODE 0x4
2121

22-
#define MIIC_MODCTRL 0x20
22+
#define MIIC_MODCTRL 0x8
2323
#define MIIC_MODCTRL_SW_MODE GENMASK(4, 0)
2424

2525
#define MIIC_CONVCTRL(port) (0x100 + (port) * 4)

0 commit comments

Comments
 (0)