]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
i3c: mipi-i3c-hci: Use physical device pointer with DMA API
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Fri, 22 Aug 2025 10:56:29 +0000 (13:56 +0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 16 Sep 2025 15:06:42 +0000 (17:06 +0200)
commit9e23897bca622eae20d2c038cc09b45bfaf5aed2
tree003f195548f8cbe25d82430cfe11774136c6e5ab
parent1c46bfc4f75e7d43261af65b64e7d3dc4a30daa9
i3c: mipi-i3c-hci: Use physical device pointer with DMA API

DMA transfer faults on Intel hardware when the IOMMU is enabled and
driver initialization will fail when attempting to do the first transfer:

DMAR: DRHD: handling fault status reg 2
DMAR: [DMA Read NO_PASID] Request device [00:11.0] fault addr 0x676e3000 [fault reason 0x71] SM: Present bit in first-level paging entry is clear
  i3c mipi-i3c-hci.0: ring 0: Transfer Aborted
mipi-i3c-hci mipi-i3c-hci.0: probe with driver mipi-i3c-hci failed with error -62

Reason for this is that the IOMMU setup is done for the physical devices
only and not for the virtual I3C Controller device object.

Therefore use the pointer to a physical device object with the DMA API.

Due to a data corruption observation when the device DMA is IOMMU
mapped, a properly sized receive bounce buffer is required if transfer
length is not a multiple of DWORDs.

Reported-by:
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250822105630.2820009-4-jarkko.nikula@linux.intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/mipi-i3c-hci/dma.c