linux-stable/drivers/dma/ptdma
Tadeusz Struk 300111cd90 dmaengine: ptdma: use consistent DMA masks
commit df2515a179 upstream.

The PTDMA driver sets DMA masks in two different places for the same
device inconsistently. First call is in pt_pci_probe(), where it uses
48bit mask. The second call is in pt_dmaengine_register(), where it
uses a 64bit mask. Using 64bit dma mask causes IO_PAGE_FAULT errors
on DMA transfers between main memory and other devices.
Without the extra call it works fine. Additionally the second call
doesn't check the return value so it can silently fail.
Remove the superfluous dma_set_mask() call and only use 48bit mask.

Cc: stable@vger.kernel.org
Fixes: b0b4a6b105 ("dmaengine: ptdma: register PTDMA controller as a DMA resource")
Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Tadeusz Struk <tstruk@gigaio.com>
Link: https://lore.kernel.org/r/20240222163053.13842-1-tstruk@gigaio.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-06 14:45:10 +00:00
..
Kconfig
Makefile dmaengine: ptdma: Add debugfs entries for PTDMA 2021-08-29 19:14:20 +05:30
ptdma-debugfs.c dmaengine: ptdma: Add debugfs entries for PTDMA 2021-08-29 19:14:20 +05:30
ptdma-dev.c ptdma: pt_core_execute_cmd() should use spinlock 2023-02-01 08:34:25 +01:00
ptdma-dmaengine.c dmaengine: ptdma: use consistent DMA masks 2024-03-06 14:45:10 +00:00
ptdma-pci.c
ptdma.h ptdma: pt_core_execute_cmd() should use spinlock 2023-02-01 08:34:25 +01:00