From d5d126b73ec2214552ff111e56b885bb997389cf Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Mon, 30 Aug 2021 10:36:24 +0800 Subject: [PATCH] aes/sha: fixed driver reseting the wrong GDMA channel Driver was using the channel ID from tx when reseting rx. But since rx and tx is not necessarily from the same pair this could lead to the driver reseting the wrong DMA channel. --- .../mbedtls/port/crypto_shared_gdma/esp_crypto_shared_gdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mbedtls/port/crypto_shared_gdma/esp_crypto_shared_gdma.c b/components/mbedtls/port/crypto_shared_gdma/esp_crypto_shared_gdma.c index 118fee0a4f..e2231eeb6c 100644 --- a/components/mbedtls/port/crypto_shared_gdma/esp_crypto_shared_gdma.c +++ b/components/mbedtls/port/crypto_shared_gdma/esp_crypto_shared_gdma.c @@ -141,7 +141,7 @@ esp_err_t esp_crypto_shared_gdma_start(const lldesc_t *input, const lldesc_t *ou } /* tx channel is reset by gdma_connect(), also reset rx to ensure a known state */ - gdma_get_channel_id(tx_channel, &rx_ch_id); + gdma_get_channel_id(rx_channel, &rx_ch_id); gdma_ll_rx_reset_channel(&GDMA, rx_ch_id); gdma_start(tx_channel, (intptr_t)input);