mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
phy: rockchip-samsung-dcphy: fix out-of-range max_register
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: b2a1a2ae78 ("phy: rockchip: Add Samsung MIPI D-/C-PHY driver")
Cc: stable@vger.kernel.org
Signed-off-by: Jason Yang <jason98166@gmail.com>
Assisted-by: Claude:claude-opus-5
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260811-dcphy-maxreg-v1-v1-1-aa63f6a63a64@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
1781be3c8a
commit
4486e75ba6
|
|
@ -1527,7 +1527,7 @@ static const struct regmap_config samsung_mipi_dcphy_regmap_config = {
|
|||
.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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user