Thread (28 messages) 28 messages, 7 authors, 2025-12-17

Re: [PATCH 5/8] nvmet: pci-epf: Remove unnecessary dmaengine_terminate_sync() on each DMA transfer

From: Frank Li <Frank.li@nxp.com>
Date: 2025-12-09 15:45:10
Also in: dmaengine, imx, linux-arm-msm, linux-crypto, linux-nvme, linux-pci, lkml

On Tue, Dec 09, 2025 at 03:52:15PM +0900, Damien Le Moal wrote:
On 12/9/25 2:09 AM, Frank Li wrote:
quoted
dmaengine_terminate_sync() cancels all pending requests. Calling it for
every DMA transfer is unnecessary and counterproductive. This function is
generally intended for cleanup paths such as module removal, device close,
or unbind operations.

Remove the redundant calls.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
This one also fix stress test failure after remove mutex and use new API
dmaengine_prep_slave_sg_config().
---
 drivers/nvme/target/pci-epf.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c
index 2e78397a7373a7d8ba67150f301f392123db88d1..85225a4f75b5bd7abb6897d064123766af021542 100644
--- a/drivers/nvme/target/pci-epf.c
+++ b/drivers/nvme/target/pci-epf.c
@@ -420,8 +420,6 @@ static int nvmet_pci_epf_dma_transfer(struct nvmet_pci_epf *nvme_epf,
 		ret = -EIO;
 	}

-	dmaengine_terminate_sync(chan);
If the above dma_sync_wait failed, we better call this here as we have no idea
why we got the failure, no ?
Yes, it should be call at only failure case.

Frank
For success case, we indeed may want to remove it.
quoted
-
 unmap:
 	dma_unmap_single(dma_dev, dma_addr, seg->length, dir);

--
Damien Le Moal
Western Digital Research
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help