[PATCH v2 0/3] i3c: Improve CCC reliability for DesignWare master
| Newsgroups | org.infradead.lists.linux-i3c,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
From: Tze Yee Ng <[email protected]> Improve I3C CCC handling on the DesignWare master used on SoCFPGA platforms: report the actual GET payload length, map hardware errors to I3C M0/M2, and validate GET responses with a single retry for transient failures. Patch 1/3 fixes a DW driver bug: on successful GET CCC, set dests[0].payload.len from RESPONSE_PORT_DATA_LEN. Patch 2/3 maps DesignWare response-queue errors to ccc->err (M2 for IBA/address NACK; M0 for CRC/parity/frame/transfer-abort). Patch 3/3 moves protocol handling into the I3C core: validate GET payload length (GETMRL: 2 or 3 bytes; GETMXDS: 2 or 5 bytes), retry GET CCCs once on M0/M2, restore requested payload.len on retry/error, and use a stack buffer for the common single-destination GET case. Changes in v2: - Split the monolithic patch into three patches (per review feedback). - Move GET payload validation and CCC retry from the DW driver to drivers/i3c/master.c. - Validate GET CCCs only; drop SET payload-length checks (DW RESPONSE_PORT_DATA_LEN is 0 on SET). - Retry GET CCCs only; do not repeat side-effecting SET CCCs. - Tighten GETMRL validation to exactly 2 or 3 bytes; add GETMXDS 2/5-byte handling. - Expand M0 mapping to CRC/parity/transfer-abort, not only frame errors. - Restore dests[].payload.len before retry and on error return. - Avoid kmalloc on the common single-destination GET path. Adrian Ng Ho Yin (3): i3c: master: dw: Report actual GET CCC payload length on success i3c: master: dw: Map CCC hardware errors to I3C M0/M2 i3c: master: Validate GET CCC payload length and retry M0/M2 once drivers/i3c/master.c | 111 ++++++++++++++++++++++++++++- drivers/i3c/master/dw-i3c-master.c | 39 ++++++++-- 2 files changed, 143 insertions(+), 7 deletions(-) -- 2.43.7 -- linux-i3c mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-i3c