Commit 7645422
committed
HSD#22021259142: i3c: dw-i3c: Treat TX/RX length mismatch as M0 error
Enhance error handling for Common Command Code (CCC) operations in the
DesignWare I3C master driver:
* Define GET_MRL_MIN_LEN (2) for validating GETMRL responses.
* In dw_i3c_ccc_get(), treat an RX length smaller than the expected
payload length or smaller than GET_MRL_MIN_LEN for GETMRL as an
M0 (frame) error and return -EIO.
* In dw_i3c_ccc_set(), similarly map RX length mismatches to I3C_ERROR_M0.
These changes improve robustness by flagging incomplete or malformed
responses during CCC transfers rather than silently accepting truncated
data.
Signed-off-by: Adrian Ng Ho Yin <adrianhoyin.ng@altera.com>1 parent 3fd633e commit 7645422
1 file changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
| |||
774 | 776 | | |
775 | 777 | | |
776 | 778 | | |
777 | | - | |
| 779 | + | |
| 780 | + | |
778 | 781 | | |
779 | 782 | | |
780 | 783 | | |
| |||
787 | 790 | | |
788 | 791 | | |
789 | 792 | | |
| 793 | + | |
790 | 794 | | |
791 | 795 | | |
792 | 796 | | |
| |||
820 | 824 | | |
821 | 825 | | |
822 | 826 | | |
823 | | - | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
824 | 833 | | |
| 834 | + | |
| 835 | + | |
825 | 836 | | |
826 | 837 | | |
827 | 838 | | |
| |||
0 commit comments