Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

i3c: master: Move rstdaa error suppression

Prepare to fix improper Mx positive error propagation in later
commits by handling Mx error codes where the i3c_ccc_cmd command
is allocated. Two of the four i3c_master_rstdaa_locked() are error
paths that already suppressed the return value, the remaining two
are changed to handle the I3C_ERROR_M2 Mx error code inside
i3c_master_rstdaa_locked(), checking cmd->err directly.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Link: https://patch.msgid.link/20260323-ad4062-positive-error-fix-v3-1-30bdc68004be@analog.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Jorge Marques and committed by
Alexandre Belloni
19a1b61f 6105f491

+6 -5
+6 -5
drivers/i3c/master.c
··· 1043 1043 ret = i3c_master_send_ccc_cmd_locked(master, &cmd); 1044 1044 i3c_ccc_cmd_dest_cleanup(&dest); 1045 1045 1046 + /* No active devices on the bus. */ 1047 + if (ret && cmd.err == I3C_ERROR_M2) 1048 + ret = 0; 1049 + 1046 1050 return ret; 1047 1051 } 1048 1052 ··· 1825 1821 1826 1822 i3c_bus_maintenance_lock(&master->bus); 1827 1823 1828 - if (rstdaa) { 1824 + if (rstdaa) 1829 1825 rstret = i3c_master_rstdaa_locked(master, I3C_BROADCAST_ADDR); 1830 - if (rstret == I3C_ERROR_M2) 1831 - rstret = 0; 1832 - } 1833 1826 1834 1827 ret = master->ops->do_daa(master); 1835 1828 ··· 2121 2120 * (assigned by the bootloader for example). 2122 2121 */ 2123 2122 ret = i3c_master_rstdaa_locked(master, I3C_BROADCAST_ADDR); 2124 - if (ret && ret != I3C_ERROR_M2) 2123 + if (ret) 2125 2124 goto err_bus_cleanup; 2126 2125 2127 2126 if (master->ops->set_speed) {