linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: renesas_usbhs: use proper DMAENGINE API for termination
@ 2025-06-03 17:58 Wolfram Sang
  0 siblings, 0 replies; only message in thread
From: Wolfram Sang @ 2025-06-03 17:58 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Yoshihiro Shimoda, Greg Kroah-Hartman, linux-usb

dmaengine_terminate_all() is deprecated in favor of explicitly saying if
it should be sync or async. Here, we want dmaengine_terminate_sync()
because there is no other synchronization code in the driver to handle
an async case.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---

This was an RFC 4 years ago [1], and then slipped through the cracks.
Shimoda-san agreed to this patch, but we decided to let a change of his
go in first. This has happened meanwhile, so according to the back then
discussion, it should be good now.

[1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20210623100304.3697-1-wsa+renesas@sang-engineering.com/

 drivers/usb/renesas_usbhs/fifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index 10607e273879..bac6f8fd0055 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -123,7 +123,7 @@ struct usbhs_pkt *usbhs_pkt_pop(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt)
 		if (fifo)
 			chan = usbhsf_dma_chan_get(fifo, pkt);
 		if (chan) {
-			dmaengine_terminate_all(chan);
+			dmaengine_terminate_sync(chan);
 			usbhsf_dma_unmap(pkt);
 		} else {
 			if (usbhs_pipe_is_dir_in(pipe))
-- 
2.47.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-06-03 18:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03 17:58 [PATCH] usb: renesas_usbhs: use proper DMAENGINE API for termination Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).