Re: [PATCH] i3c: mipi-i3c-hci: Fix number of DAT/DCT entries for HCI versions < 1.1

Greg KH
2024-06-14T14:14:36Z

On Fri, Jun 14, 2024 at 05:02:08PM +0300, Jarkko Nikula wrote:
> I was wrong about the TABLE_SIZE field description in the
> commit 0676bfebf576 ("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: 0676bfebf576 ("i3c: mipi-i3c-hci: Fix DAT/DCT entry sizes")
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> drivers/i3c/master/mipi-i3c-hci/core.c | 8 ++++++++
> 1 file changed, 8 insertions(+)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.