Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 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>

authored by

Adrian Hunter and committed by
Alexandre Belloni
4167b891 663eb876

+5 -5
+1 -1
drivers/i3c/master/mipi-i3c-hci/cmd_v1.c
··· 334 334 hci->io->queue_xfer(hci, xfer, 1); 335 335 if (!wait_for_completion_timeout(&done, HZ) && 336 336 hci->io->dequeue_xfer(hci, xfer, 1)) { 337 - ret = -ETIME; 337 + ret = -ETIMEDOUT; 338 338 break; 339 339 } 340 340 if ((RESP_STATUS(xfer->response) == RESP_ERR_ADDR_HEADER ||
+1 -1
drivers/i3c/master/mipi-i3c-hci/cmd_v2.c
··· 275 275 hci->io->queue_xfer(hci, xfer, 2); 276 276 if (!wait_for_completion_timeout(&done, HZ) && 277 277 hci->io->dequeue_xfer(hci, xfer, 2)) { 278 - ret = -ETIME; 278 + ret = -ETIMEDOUT; 279 279 break; 280 280 } 281 281 if (RESP_STATUS(xfer[0].response) != RESP_SUCCESS) {
+3 -3
drivers/i3c/master/mipi-i3c-hci/core.c
··· 261 261 goto out; 262 262 if (!wait_for_completion_timeout(&done, HZ) && 263 263 hci->io->dequeue_xfer(hci, xfer, nxfers)) { 264 - ret = -ETIME; 264 + ret = -ETIMEDOUT; 265 265 goto out; 266 266 } 267 267 for (i = prefixed; i < nxfers; i++) { ··· 340 340 goto out; 341 341 if (!wait_for_completion_timeout(&done, HZ) && 342 342 hci->io->dequeue_xfer(hci, xfer, nxfers)) { 343 - ret = -ETIME; 343 + ret = -ETIMEDOUT; 344 344 goto out; 345 345 } 346 346 for (i = 0; i < nxfers; i++) { ··· 388 388 goto out; 389 389 if (!wait_for_completion_timeout(&done, m->i2c.timeout) && 390 390 hci->io->dequeue_xfer(hci, xfer, nxfers)) { 391 - ret = -ETIME; 391 + ret = -ETIMEDOUT; 392 392 goto out; 393 393 } 394 394 for (i = 0; i < nxfers; i++) {