]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
i3c: mipi-i3c-hci: Use ETIMEDOUT instead of ETIME for timeout errors
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 6 Mar 2026 07:24:38 +0000 (09:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Mar 2026 15:15:31 +0000 (16:15 +0100)
commit 4167b8914463132654e01e16259847d097f8a7f7 upstream.

The MIPI I3C HCI driver currently returns -ETIME for various timeout
conditions, while other I3C master drivers consistently use -ETIMEDOUT
for the same class of errors.  Align the HCI driver with the rest of the
subsystem by replacing all uses of -ETIME with -ETIMEDOUT.

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-2-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i3c/master/mipi-i3c-hci/cmd_v1.c
drivers/i3c/master/mipi-i3c-hci/cmd_v2.c
drivers/i3c/master/mipi-i3c-hci/core.c

index eb8a3ae2990d772650879db7eaf230625d7982b4..efb7a1f92641cad5fc395c4277a8f539ffe7fe4a 100644 (file)
@@ -336,7 +336,7 @@ static int hci_cmd_v1_daa(struct i3c_hci *hci)
                hci->io->queue_xfer(hci, xfer, 1);
                if (!wait_for_completion_timeout(&done, HZ) &&
                    hci->io->dequeue_xfer(hci, xfer, 1)) {
-                       ret = -ETIME;
+                       ret = -ETIMEDOUT;
                        break;
                }
                if ((RESP_STATUS(xfer->response) == RESP_ERR_ADDR_HEADER ||
index efb4326a25b73e5ae03fbe0eea0384517dd1e824..5fc2e4c55ebb0443157d2ef06de7b067f69c029a 100644 (file)
@@ -277,7 +277,7 @@ static int hci_cmd_v2_daa(struct i3c_hci *hci)
                hci->io->queue_xfer(hci, xfer, 2);
                if (!wait_for_completion_timeout(&done, HZ) &&
                    hci->io->dequeue_xfer(hci, xfer, 2)) {
-                       ret = -ETIME;
+                       ret = -ETIMEDOUT;
                        break;
                }
                if (RESP_STATUS(xfer[0].response) != RESP_SUCCESS) {
index 607d77ab0e54691705845c33a79939820a83c9f0..11efe28fb46cff36533521bbdc46c3ab8e83a5e0 100644 (file)
@@ -230,7 +230,7 @@ static int i3c_hci_send_ccc_cmd(struct i3c_master_controller *m,
                goto out;
        if (!wait_for_completion_timeout(&done, HZ) &&
            hci->io->dequeue_xfer(hci, xfer, nxfers)) {
-               ret = -ETIME;
+               ret = -ETIMEDOUT;
                goto out;
        }
        for (i = prefixed; i < nxfers; i++) {
@@ -309,7 +309,7 @@ static int i3c_hci_i3c_xfers(struct i3c_dev_desc *dev,
                goto out;
        if (!wait_for_completion_timeout(&done, HZ) &&
            hci->io->dequeue_xfer(hci, xfer, nxfers)) {
-               ret = -ETIME;
+               ret = -ETIMEDOUT;
                goto out;
        }
        for (i = 0; i < nxfers; i++) {
@@ -357,7 +357,7 @@ static int i3c_hci_i2c_xfers(struct i2c_dev_desc *dev,
                goto out;
        if (!wait_for_completion_timeout(&done, m->i2c.timeout) &&
            hci->io->dequeue_xfer(hci, xfer, nxfers)) {
-               ret = -ETIME;
+               ret = -ETIMEDOUT;
                goto out;
        }
        for (i = 0; i < nxfers; i++) {