]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
i3c: mipi-i3c-hci: Consolidate common xfer processing logic
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 6 Mar 2026 07:24:48 +0000 (09:24 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 11 Mar 2026 21:10:02 +0000 (22:10 +0100)
commit7ac45bc68f089887ab3a70358057edb7e6b6084e
treeebc4d70ecc7da3bc48a93c6aa92d4a48a9111f36
parentb6d586431ae20d5157ee468d0ef62ad26798ef13
i3c: mipi-i3c-hci: Consolidate common xfer processing logic

Several parts of the MIPI I3C HCI driver duplicate the same sequence for
queuing a transfer, waiting for completion, and handling timeouts. This
logic appears in five separate locations and will be affected by an
upcoming fix.

Refactor the repeated code into a new helper, i3c_hci_process_xfer(), and
store the timeout value in the hci_xfer structure so that callers do not
need to pass it as a separate parameter.

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-12-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
drivers/i3c/master/mipi-i3c-hci/hci.h