summaryrefslogtreecommitdiff
path: root/drivers/crypto/omap-aes-gcm.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2019-11-05 17:01:06 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-12-11 11:36:59 +0300
commit5d5f3eed29379b3edc499729bb6f8651a9848fe4 (patch)
tree7a5f613caba029891ff0b9eb431a97108a8dae4e /drivers/crypto/omap-aes-gcm.c
parentf0956d42c14abfeda9d0be7f06999363cab3e99a (diff)
downloadlinux-5d5f3eed29379b3edc499729bb6f8651a9848fe4.tar.xz
crypto: omap-aes-gcm - fix failure with assocdata only
If we only have assocdata with an omap-aes-gcm, it currently just completes it directly without passing it over to the crypto HW. This produces wrong results. Fix by passing the request down to the crypto HW, and fix the DMA support code to accept a case where we don't expect any output data. In the case where only assocdata is provided, it just passes through the accelerator and provides authentication results, without any encrypted/decrypted buffer via DMA. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/omap-aes-gcm.c')
-rw-r--r--drivers/crypto/omap-aes-gcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/omap-aes-gcm.c b/drivers/crypto/omap-aes-gcm.c
index 6da05149b195..e92000846f16 100644
--- a/drivers/crypto/omap-aes-gcm.c
+++ b/drivers/crypto/omap-aes-gcm.c
@@ -244,7 +244,7 @@ static int omap_aes_gcm_handle_queue(struct omap_aes_dev *dd,
err = omap_aes_write_ctrl(dd);
if (!err) {
- if (dd->in_sg_len && dd->out_sg_len)
+ if (dd->in_sg_len)
err = omap_aes_crypt_dma_start(dd);
else
omap_aes_gcm_dma_out_callback(dd);