linux-IllusionX/drivers/i3c
Jarkko Nikula 70a449b162 i3c: mipi-i3c-hci: Fix number of DAT/DCT entries for HCI versions < 1.1
[ Upstream commit be90ae1ba1 ]

I was wrong about the TABLE_SIZE field description in the
commit 0676bfebf5 ("i3c: mipi-i3c-hci: Fix DAT/DCT entry sizes").

For the MIPI I3C HCI versions 1.0 and earlier the TABLE_SIZE field in
the registers DAT_SECTION_OFFSET and DCT_SECTION_OFFSET is indeed defined
in DWORDs and not number of entries like it is defined in later versions.

Where above fix allowed driver initialization to continue the wrongly
interpreted TABLE_SIZE field leads variables DAT_entries being twice and
DCT_entries four times as big as they really are.

That in turn leads clearing the DAT table over the boundary in the
dat_v1.c: hci_dat_v1_init().

So interprete the TABLE_SIZE field in DWORDs for HCI versions < 1.1 and
fix number of DAT/DCT entries accordingly.

Fixes: 0676bfebf5 ("i3c: mipi-i3c-hci: Fix DAT/DCT entry sizes")
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 09:01:08 +02:00
..
master i3c: mipi-i3c-hci: Fix number of DAT/DCT entries for HCI versions < 1.1 2024-08-03 09:01:08 +02:00
device.c i3c: Add comment for -EAGAIN in i3c_device_do_priv_xfers() 2024-05-23 00:29:19 +02:00
internals.h i3c: Make i3c_bus_type const 2024-02-19 21:23:28 +01:00
Kconfig i3c: Add core I3C infrastructure 2018-11-12 10:33:49 +01:00
Makefile i3c: Add core I3C infrastructure 2018-11-12 10:33:49 +01:00
master.c i3c: master: Enable runtime PM for master controller 2024-05-23 00:29:19 +02:00