[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <TY2PR01MB3692C7B6E0FD027B5C3E05B5D8079@TY2PR01MB3692.jpnprd01.prod.outlook.com>
Date: Thu, 24 Jun 2021 01:27:09 +0000
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
CC: "linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: RE: [PATCH RFC] usb: renesas_usbhs: fifo: : use proper DMAENGINE API
for termination
Hi Wolfram-san,
> From: Wolfram Sang, Sent: Wednesday, June 23, 2021 7:03 PM
>
> 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@...g-engineering.com>
> ---
>
> Shimoda-san, can you please double check if this works with the
> additional locking in this function? Thank you!
Thank you for the patch! I checked and tested this patch and worked
correctly on my environment.
# To be honest, both shdma and usb-dmac driver doesn't support .device_synchronize
# so that _async() is enough for now.
However, I have a concern which this patch will conflict my fixed patch [1].
[1]
https://lore.kernel.org/linux-renesas-soc/20210611105411.543008-2-yoshihiro.shimoda.uh@renesas.com/
Since I caused a trouble [2], the patch [1] was not merged yet.
So, I intended to resend the patch in near the future.
[2]
https://lore.kernel.org/linux-renesas-soc/TY2PR01MB3692555C6EAC8F02BC8B3D63D8329@TY2PR01MB3692.jpnprd01.prod.outlook.com/
In backporting point of view, I guess it's better to apply my fixed patch at first,
and then apply this DMAENGINE patch. But, what do you think?
Best regards,
Yoshihiro Shimoda
> 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
Powered by blists - more mailing lists