]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i3c: mipi-i3c-hci: Fix Hot-Join NACK
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 6 Mar 2026 07:24:39 +0000 (09:24 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 11 Mar 2026 21:10:01 +0000 (22:10 +0100)
The MIPI I3C HCI host controller driver does not implement Hot-Join
handling, yet Hot-Join response control defaults to allowing devices to
Hot-Join the bus.  Configure HC_CONTROL_HOT_JOIN_CTRL to NACK all Hot-Join
attempts.

Fixes: 9ad9a52cce282 ("i3c/master: introduce the mipi-i3c-hci driver")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260306072451.11131-3-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/mipi-i3c-hci/core.c

index dbe93df0c70e64b7599d39c2cd168b7b6f6792d2..4877a321edf990d00d2efee4c825ffc2ab66420d 100644 (file)
@@ -152,7 +152,8 @@ static int i3c_hci_bus_init(struct i3c_master_controller *m)
        if (hci->quirks & HCI_QUIRK_RESP_BUF_THLD)
                amd_set_resp_buf_thld(hci);
 
-       reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE);
+       /* Enable bus with Hot-Join disabled */
+       reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE | HC_CONTROL_HOT_JOIN_CTRL);
        dev_dbg(&hci->master.dev, "HC_CONTROL = %#x", reg_read(HC_CONTROL));
 
        return 0;
@@ -764,7 +765,8 @@ static int i3c_hci_runtime_resume(struct device *dev)
 
        hci->io->resume(hci);
 
-       reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE);
+       /* Enable bus with Hot-Join disabled */
+       reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE | HC_CONTROL_HOT_JOIN_CTRL);
 
        return 0;
 }