In DMA mode, the IBI status descriptor encodes the payload using
CHUNKS (number of chunks) and DATA_LENGTH (valid bytes in the last
chunk). All preceding chunks are implicitly full-sized.
The current code accumulates full chunk sizes for non-final status
descriptors, but for the final status descriptor it only adds
DATA_LENGTH. This ignores the contribution of the preceding full
chunks described by the same final status entry.
As a result, the computed IBI payload length is truncated whenever
the final status spans multiple chunks. For example, with a chunk
size of 4 bytes, CHUNKS=2 and DATA_LENGTH=1 should result in a total
payload size of 5 bytes, but the current code reports only 1 byte.
Fix the calculation by adding the size of (CHUNKS - 1) full chunks
plus DATA_LENGTH for the last chunk.
Fixes:
|
||
|---|---|---|
| .. | ||
| Makefile | ||
| cmd.h | ||
| cmd_v1.c | ||
| cmd_v2.c | ||
| core.c | ||
| dat.h | ||
| dat_v1.c | ||
| dct.h | ||
| dct_v1.c | ||
| dma.c | ||
| ext_caps.c | ||
| ext_caps.h | ||
| hci.h | ||
| hci_quirks.c | ||
| ibi.h | ||
| mipi-i3c-hci-pci.c | ||
| pio.c | ||
| xfer_mode_rate.h | ||