]> git.baikalelectronics.ru Git - kernel.git/commit
serial: samsung: use dma_ops of DMA if attached
authorTamseel Shams <m.shams@samsung.com>
Tue, 29 Jun 2021 04:59:02 +0000 (10:29 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 10:40:33 +0000 (12:40 +0200)
commit696131b70bf89f1a03d972d34c93f00d79897604
treebdc8fb5e816c15a0331caf60d157ff0b6fdb2ebf
parentf29763bb01d2bae7e28c37f291caa03d498158b7
serial: samsung: use dma_ops of DMA if attached

When DMA is used for TX and RX by serial driver, it should
pass the DMA device pointer to DMA API instead of UART device
pointer. DMA device should be used for DMA API because only
the DMA device is aware of how the device connects to the memory.
There might be an extra level of address translation due to a
SMMU attached to the DMA device. When serial device is used for
DMA API, the DMA API will have no clue of the SMMU attached to
the DMA device.

This patch is necessary to fix the SMMU page faults
which is observed when a DMA(with SMMU enabled) is attached
to UART for transfer.

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Tamseel Shams <m.shams@samsung.com>
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Link: https://lore.kernel.org/r/20210629045902.48912-1-m.shams@samsung.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/samsung_tty.c