6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Yang <redacted>
commit 4486e75ba647bd8b98fc1f053101b40caceeed4b upstream.
The PHY register block is 64KB, so with a register stride of 4 the
last accessible register sits at offset 0xfffc. max_register names
0x10000, one register past the end of the mapping: dumping the
registers through the regmap debugfs interface reads beyond the
ioremapped region and oopses on the unmapped page. The oops fires
with the regmap lock held, so later PHY operations deadlock.
Fixes: b2a1a2ae7818 ("phy: rockchip: Add Samsung MIPI D-/C-PHY driver")
Cc: <redacted>
Signed-off-by: Jason Yang <redacted>
Assisted-by: Claude:claude-opus-5
Reviewed-by: Sebastian Reichel <redacted>
Link: https://patch.msgid.link/20260811-dcphy-maxreg-v1-v1-1-aa63f6a63a64@gmail.com (local)
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
@@ -1525,7 +1525,7 @@ static const struct regmap_config samsun
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
- .max_register = 0x10000,
+ .max_register = 0xfffc,
};
static struct phy *samsung_mipi_dcphy_xlate(struct device *dev,