Skip to content

Commit f83f86e

Browse files
jhnikulaalexandrebelloni
authored andcommitted
i3c: mipi-i3c-hci: Handle I3C address header error in hci_cmd_v1_daa()
Handle also I3C address header error response status as the end of DAA process in hci_cmd_v1_daa(). According to MIPI I3C HCI Specification v1.1 the NACK error during DAA process comes when the device does not accept the dynamic address. Currently code uses it for successful exit from the process and fails with any other error response. I'm unsure is this MIPI I3C HCI version specific difference or specification misunderstanding but on an early MIPI I3C HCI version compatible controller responds always with I3C address header error and not with NACK error when there is no device on the bus or no more devices participating to DAA process. Handle now both response statuses as the end of DAA. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Link: https://lore.kernel.org/r/20231109133708.653950-4-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 0be1a06 commit f83f86e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ static int hci_cmd_v1_daa(struct i3c_hci *hci)
339339
ret = -ETIME;
340340
break;
341341
}
342-
if (RESP_STATUS(xfer->response) == RESP_ERR_NACK &&
342+
if ((RESP_STATUS(xfer->response) == RESP_ERR_ADDR_HEADER ||
343+
RESP_STATUS(xfer->response) == RESP_ERR_NACK) &&
343344
RESP_DATA_LENGTH(xfer->response) == 1) {
344345
ret = 0; /* no more devices to be assigned */
345346
break;

0 commit comments

Comments
 (0)