linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] usb: renesas_usbhs: fifo: : use proper DMAENGINE API for termination
@ 2021-06-23 10:03 Wolfram Sang
  2021-06-24  1:27 ` Yoshihiro Shimoda
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2021-06-23 10:03 UTC (permalink / raw)
  To: linux-usb
  Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang,
	Greg Kroah-Hartman, linux-kernel

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>
---

Shimoda-san, can you please double check if this works with the
additional locking in this function? Thank you!

 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 b5e7991dc7d9..6176f2325f03 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -121,7 +121,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);
 		}
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-24 10:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 10:03 [PATCH RFC] usb: renesas_usbhs: fifo: : use proper DMAENGINE API for termination Wolfram Sang
2021-06-24  1:27 ` Yoshihiro Shimoda
2021-06-24  5:53   ` Wolfram Sang
2021-06-24 10:36     ` Yoshihiro Shimoda

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).