]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 11 Mar 2026 21:10:01 +0000 (22:10 +0100)
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>
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 fe260461e7e619709042400d7dd80b223f02e542..831a261f6c5675a8b05e4fc6835d4771da5bab79 100644 (file)
@@ -334,7 +334,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 3729e6419581892487823c94be75ac4e05405601..054beee36da52af3b76133e89348e814490cb23a 100644 (file)
@@ -275,7 +275,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 5879bba781649224e9cced0311ce3bc2809d00c7..dbe93df0c70e64b7599d39c2cd168b7b6f6792d2 100644 (file)
@@ -261,7 +261,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++) {
@@ -340,7 +340,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++) {
@@ -388,7 +388,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++) {