Skip to content

Commit 4167b89

Browse files
ahunter6alexandrebelloni
authored andcommitted
i3c: mipi-i3c-hci: Use ETIMEDOUT instead of ETIME for timeout errors
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>
1 parent 663eb87 commit 4167b89

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
@@ -334,7 +334,7 @@ static int hci_cmd_v1_daa(struct i3c_hci *hci)
334334
hci->io->queue_xfer(hci, xfer, 1);
335335
if (!wait_for_completion_timeout(&done, HZ) &&
336336
hci->io->dequeue_xfer(hci, xfer, 1)) {
337-
ret = -ETIME;
337+
ret = -ETIMEDOUT;
338338
break;
339339
}
340340
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
@@ -275,7 +275,7 @@ static int hci_cmd_v2_daa(struct i3c_hci *hci)
275275
hci->io->queue_xfer(hci, xfer, 2);
276276
if (!wait_for_completion_timeout(&done, HZ) &&
277277
hci->io->dequeue_xfer(hci, xfer, 2)) {
278-
ret = -ETIME;
278+
ret = -ETIMEDOUT;
279279
break;
280280
}
281281
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
@@ -261,7 +261,7 @@ static int i3c_hci_send_ccc_cmd(struct i3c_master_controller *m,
261261
goto out;
262262
if (!wait_for_completion_timeout(&done, HZ) &&
263263
hci->io->dequeue_xfer(hci, xfer, nxfers)) {
264-
ret = -ETIME;
264+
ret = -ETIMEDOUT;
265265
goto out;
266266
}
267267
for (i = prefixed; i < nxfers; i++) {
@@ -340,7 +340,7 @@ static int i3c_hci_i3c_xfers(struct i3c_dev_desc *dev,
340340
goto out;
341341
if (!wait_for_completion_timeout(&done, HZ) &&
342342
hci->io->dequeue_xfer(hci, xfer, nxfers)) {
343-
ret = -ETIME;
343+
ret = -ETIMEDOUT;
344344
goto out;
345345
}
346346
for (i = 0; i < nxfers; i++) {
@@ -388,7 +388,7 @@ static int i3c_hci_i2c_xfers(struct i2c_dev_desc *dev,
388388
goto out;
389389
if (!wait_for_completion_timeout(&done, m->i2c.timeout) &&
390390
hci->io->dequeue_xfer(hci, xfer, nxfers)) {
391-
ret = -ETIME;
391+
ret = -ETIMEDOUT;
392392
goto out;
393393
}
394394
for (i = 0; i < nxfers; i++) {

0 commit comments

Comments
 (0)