]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i3c: mipi-i3c-hci: Tolerate i3c_master_add_i3c_dev_locked() failures in DAA
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 12 Jun 2026 08:01:04 +0000 (11:01 +0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 14 Jun 2026 19:49:11 +0000 (21:49 +0200)
i3c_master_add_i3c_dev_locked() no longer leaves the address marked as
free on failure, so aborting the DAA sequence on its error is unnecessary.

Failure to register a discovered device does not invalidate the entire
Dynamic Address Assignment (DAA) procedure.  Align with the behavior of
other I3C master drivers by ignoring errors from
i3c_master_add_i3c_dev_locked() and continuing enumeration.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260612080107.11606-5-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/mipi-i3c-hci/cmd_v1.c
drivers/i3c/master/mipi-i3c-hci/cmd_v2.c

index 75d452d7f6af88964247f7ca25aed35bc5142a07..3b9345718d273d32eb76450f478ef6269a2ed7de 100644 (file)
@@ -358,9 +358,7 @@ static int hci_cmd_v1_daa(struct i3c_hci *hci)
                 * TODO: Extend the subsystem layer to allow for registering
                 * new device and provide BCR/DCR/PID at the same time.
                 */
-               ret = i3c_master_add_i3c_dev_locked(&hci->master, next_addr);
-               if (ret)
-                       break;
+               i3c_master_add_i3c_dev_locked(&hci->master, next_addr);
        }
 
        if (dat_idx >= 0)
index 39eec26a363c7b6bb2ad52ff16efc4f0c5707e7a..8d93748e858dd339b6b2d8cbf12f22e4ea4cb138 100644 (file)
@@ -296,9 +296,7 @@ static int hci_cmd_v2_daa(struct i3c_hci *hci)
                 * TODO: Extend the subsystem layer to allow for registering
                 * new device and provide BCR/DCR/PID at the same time.
                 */
-               ret = i3c_master_add_i3c_dev_locked(&hci->master, next_addr);
-               if (ret)
-                       break;
+               i3c_master_add_i3c_dev_locked(&hci->master, next_addr);
        }
 
        hci_free_xfer(xfer, 2);