Re: [PATCH v3 3/6] i3c: master: svc: fix ibi may not return mandatory data byte
From: Miquel Raynal
Date: Fri Oct 20 2023 - 09:49:43 EST
Hi Frank,
Frank.Li@xxxxxxx wrote on Thu, 19 Oct 2023 18:27:22 -0400:
> MSTATUS[RXPEND] is only updated after the data transfer cycle started. This
> creates an issue when the I3C clock is slow, and the CPU is running fast
> enough that MSTATUS[RXPEND] may not be updated when the code reaches
> checking point. As a result, mandatory data can be missed.
>
> Add a wait for MSTATUS[COMPLETE] to ensure that all mandatory data is
> already in FIFO. It also works without mandatory data.
>
> Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
Thanks,
Miquèl