Skip to content

Commit dc93a3b

Browse files
ahunter6gregkh
authored andcommitted
i3c: mipi-i3c-hci: Use ETIMEDOUT instead of ETIME for timeout errors
commit 4167b89 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: 9ad9a52 ("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>
1 parent 739fdfe commit dc93a3b

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/i3c/master/mipi-i3c-hci/cmd_v1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static int hci_cmd_v1_daa(struct i3c_hci *hci)
336336
hci->io->queue_xfer(hci, xfer, 1);
337337
if (!wait_for_completion_timeout(&done, HZ) &&
338338
hci->io->dequeue_xfer(hci, xfer, 1)) {
339-
ret = -ETIME;
339+
ret = -ETIMEDOUT;
340340
break;
341341
}
342342
if ((RESP_STATUS(xfer->response) == RESP_ERR_ADDR_HEADER ||

drivers/i3c/master/mipi-i3c-hci/cmd_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static int hci_cmd_v2_daa(struct i3c_hci *hci)
277277
hci->io->queue_xfer(hci, xfer, 2);
278278
if (!wait_for_completion_timeout(&done, HZ) &&
279279
hci->io->dequeue_xfer(hci, xfer, 2)) {
280-
ret = -ETIME;
280+
ret = -ETIMEDOUT;
281281
break;
282282
}
283283
if (RESP_STATUS(xfer[0].response) != RESP_SUCCESS) {

drivers/i3c/master/mipi-i3c-hci/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static int i3c_hci_send_ccc_cmd(struct i3c_master_controller *m,
230230
goto out;
231231
if (!wait_for_completion_timeout(&done, HZ) &&
232232
hci->io->dequeue_xfer(hci, xfer, nxfers)) {
233-
ret = -ETIME;
233+
ret = -ETIMEDOUT;
234234
goto out;
235235
}
236236
for (i = prefixed; i < nxfers; i++) {
@@ -309,7 +309,7 @@ static int i3c_hci_i3c_xfers(struct i3c_dev_desc *dev,
309309
goto out;
310310
if (!wait_for_completion_timeout(&done, HZ) &&
311311
hci->io->dequeue_xfer(hci, xfer, nxfers)) {
312-
ret = -ETIME;
312+
ret = -ETIMEDOUT;
313313
goto out;
314314
}
315315
for (i = 0; i < nxfers; i++) {
@@ -357,7 +357,7 @@ static int i3c_hci_i2c_xfers(struct i2c_dev_desc *dev,
357357
goto out;
358358
if (!wait_for_completion_timeout(&done, m->i2c.timeout) &&
359359
hci->io->dequeue_xfer(hci, xfer, nxfers)) {
360-
ret = -ETIME;
360+
ret = -ETIMEDOUT;
361361
goto out;
362362
}
363363
for (i = 0; i < nxfers; i++) {

0 commit comments

Comments
 (0)