Skip to contentSkip to conversation

Patch "zynq_fpga: use sgtable-based scatterlist wrappers" has been added to the 6.16-stable tree

DISCUSSION Applied Xu Yilun 2 participants 4 messages Aug 22, 2025 – Aug 25, 2025 1 message not in the archive Stable branch

lore
Share & tools
lore

Xu Yilun

author
#1 lore raw
In reply to a message not in the archive
Quoted 8 lines · On Thu, Aug 21, 2025 at 03:20:18PM +0200, [email protected] wrote:

This is a note to let you know that I've just added the patch titled

zynq_fpga: use sgtable-based scatterlist wrappers

to the 6.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

Quoted 6 lines

The filename of the patch is:
zynq_fpga-use-sgtable-based-scatterlist-wrappers.patch
and it can be found in the queue-6.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Hi Greg:

This patch solves sgtable usage issue but causes AMD fpga driver fail,

https://lore.kernel.org/linux-fpga/[email protected]/

The fix patch should be applied together with this patch:

https://lore.kernel.org/linux-fpga/[email protected]/

Thanks,
Yilun

Quoted 53 lines

From 37e00703228ab44d0aacc32a97809a4f6f58df1b Mon Sep 17 00:00:00 2001
From: Marek Szyprowski <[email protected]>
Date: Mon, 16 Jun 2025 14:09:32 +0200
Subject: zynq_fpga: use sgtable-based scatterlist wrappers

From: Marek Szyprowski <[email protected]>

commit 37e00703228ab44d0aacc32a97809a4f6f58df1b upstream.

Use common wrappers operating directly on the struct sg_table objects to fix incorrect use of statterlists related calls. dma_unmap_sg() function has to be called with the number of elements originally passed to the dma_map_sg() function, not the one returned in sgtable's nents.

---
 drivers/fpga/zynq-fpga.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/fpga/zynq-fpga.c +2 -2
@@ -406,7 +406,7 @@ static int zynq_fpga_ops_write(struct fp
 	}
 
 	priv->dma_nelms =
-	    dma_map_sg(mgr->dev.parent, sgt->sgl, sgt->nents, DMA_TO_DEVICE);
+	    dma_map_sgtable(mgr->dev.parent, sgt, DMA_TO_DEVICE, 0);
 	if (priv->dma_nelms == 0) {
 		dev_err(&mgr->dev, "Unable to DMA map (TO_DEVICE)\n");
 		return -ENOMEM;
@@ -478,7 +478,7 @@ out_clk:
 	clk_disable(priv->clk);
 
 out_free:
-	dma_unmap_sg(mgr->dev.parent, sgt->sgl, sgt->nents, DMA_TO_DEVICE);
+	dma_unmap_sgtable(mgr->dev.parent, sgt, DMA_TO_DEVICE, 0);
 	return err;
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-6.16/zynq_fpga-use-sgtable-based-scatterlist-wrappers.patch

maintainer
#2 lore raw
Quoted 18 lines · Xu Yilun
Quoted 8 lines · On Thu, Aug 21, 2025 at 03:20:18PM +0200, [email protected] wrote:

This is a note to let you know that I've just added the patch titled

zynq_fpga: use sgtable-based scatterlist wrappers

to the 6.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

Quoted 6 lines

The filename of the patch is:
zynq_fpga-use-sgtable-based-scatterlist-wrappers.patch
and it can be found in the queue-6.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Hi Greg:

Quoted 9 lines

This patch solves sgtable usage issue but causes AMD fpga driver fail,

https://lore.kernel.org/linux-fpga/[email protected]/

The fix patch should be applied together with this patch:

https://lore.kernel.org/linux-fpga/[email protected]/

What is the git id of that patch in Linus's tree?

thanks,

greg k-h

author
#3 lore raw
Quoted 24 lines · Greg KH
Quoted 23 lines · Xu Yilun
Quoted 8 lines · On Thu, Aug 21, 2025 at 03:20:18PM +0200, [email protected] wrote:

This is a note to let you know that I've just added the patch titled

zynq_fpga: use sgtable-based scatterlist wrappers

to the 6.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

Quoted 6 lines

The filename of the patch is:
zynq_fpga-use-sgtable-based-scatterlist-wrappers.patch
and it can be found in the queue-6.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Hi Greg:

This patch solves sgtable usage issue but causes AMD fpga driver fail,

https://lore.kernel.org/linux-fpga/[email protected]/

Quoted 6 lines
Quoted 4 lines

The fix patch should be applied together with this patch:

https://lore.kernel.org/linux-fpga/[email protected]/

What is the git id of that patch in Linus's tree?

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1ca61060de92a4320d73adfe5dc8d335653907ac

But I see the original "CC: [email protected]" tag is removed.

Thanks,
Yilun

Quoted 4 lines

thanks,

greg k-h

maintainer Applied
#4 lore raw
Quoted 27 lines · Xu Yilun
Quoted 26 lines · Greg KH
Quoted 25 lines · Xu Yilun
Quoted 8 lines · On Thu, Aug 21, 2025 at 03:20:18PM +0200, [email protected] wrote:

This is a note to let you know that I've just added the patch titled

zynq_fpga: use sgtable-based scatterlist wrappers

to the 6.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

Quoted 6 lines

The filename of the patch is:
zynq_fpga-use-sgtable-based-scatterlist-wrappers.patch
and it can be found in the queue-6.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Hi Greg:

This patch solves sgtable usage issue but causes AMD fpga driver fail,

https://lore.kernel.org/linux-fpga/[email protected]/

The fix patch should be applied together with this patch:

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

https://lore.kernel.org/linux-fpga/[email protected]/

What is the git id of that patch in Linus's tree?

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1ca61060de92a4320d73adfe5dc8d335653907ac

But I see the original "CC: [email protected]" tag is removed.

I picked it up a few days ago, so all is good, thanks.

greg k-h