linux-yocto/drivers/fpga
Xu Yilun 4038209594 fpga: zynq_fpga: Fix the wrong usage of dma_map_sgtable()
commit 1ca61060de92a4320d73adfe5dc8d335653907ac upstream.

dma_map_sgtable() returns only 0 or the error code. Read sgt->nents to
get the number of mapped segments.

Fixes: 37e0070322 ("zynq_fpga: use sgtable-based scatterlist wrappers")
Reported-by: Pavel Pisa <pisa@fel.cvut.cz>
Closes: https://lore.kernel.org/linux-fpga/202508041548.22955.pisa@fel.cvut.cz/
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
Tested-by: Pavel Pisa <pisa@fel.cvut.cz>
Link: https://lore.kernel.org/r/20250806070605.1920909-2-yilun.xu@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-28 16:24:34 +02:00
..
altera-cvp.c fpga: altera-cvp: Increase credit timeout 2025-06-04 14:37:59 +02:00
altera-fpga2sdram.c
altera-freeze-bridge.c
altera-hps2fpga.c
altera-pr-ip-core-plat.c
altera-pr-ip-core.c
altera-ps-spi.c
dfl-afu-dma-region.c
dfl-afu-error.c
dfl-afu-main.c
dfl-afu-region.c
dfl-afu.h
dfl-fme-br.c
dfl-fme-error.c
dfl-fme-main.c
dfl-fme-mgr.c
dfl-fme-perf.c
dfl-fme-pr.c
dfl-fme-pr.h
dfl-fme-region.c fpga: region: Use standard dev_release for class driver 2024-06-16 13:39:38 +02:00
dfl-fme.h
dfl-n3000-nios.c
dfl-pci.c
dfl.c fpga: region: Use standard dev_release for class driver 2024-06-16 13:39:38 +02:00
dfl.h
fpga-bridge.c fpga: bridge: fix kernel-doc parameter description 2023-05-11 23:00:31 +09:00
fpga-mgr.c
fpga-region.c fpga: region: add owner module and take its refcount 2024-06-16 13:39:38 +02:00
ice40-spi.c
Kconfig
machxo2-spi.c
Makefile
of-fpga-region.c fpga: region: Use standard dev_release for class driver 2024-06-16 13:39:38 +02:00
socfpga-a10.c
socfpga.c
stratix10-soc.c fpga: stratix10-soc: Fix return value check in s10_ops_write_init() 2023-02-09 11:26:44 +01:00
ts73xx-fpga.c
versal-fpga.c
xilinx-pr-decoupler.c
xilinx-spi.c
zynq-fpga.c fpga: zynq_fpga: Fix the wrong usage of dma_map_sgtable() 2025-08-28 16:24:34 +02:00
zynqmp-fpga.c