On Fri, Dec 13, 2019 at 09:54:42AM +0000, Tudor.Ambarus@xxxxxxxxxxxxx wrote: > From: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx> > > device_terminate_all() is used to abort all the pending and > ongoing transfers on the channel, it should be used just in the > error path. > > Also, dmaengine_terminate_all() is deprecated and one should use > dmaengine_terminate_async() or dmaengine_terminate_sync(). The method > is not used in atomic context, use dmaengine_terminate_sync(). > > A secondary aspect of this patch is that it luckily avoids a deadlock > between atmel_aes and at_hdmac.c. While in tasklet with the lock held, > the dma controller invokes the client callback (dmaengine_terminate_all), > which tries to get the same lock. The at_hdmac fix would be to drop the > lock before invoking the client callback, a fix on at_hdmac will follow. > > Signed-off-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx> > --- > drivers/crypto/atmel-aes.c | 32 ++------------------------------ > drivers/crypto/atmel-sha.c | 1 - > 2 files changed, 2 insertions(+), 31 deletions(-) All applied. Thanks. -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt