Re: [PATCH v6 2/2] crypto: ti: Add driver for DTHE V2 AES Engine (ECB, CBC)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19/08/25 15:26, Ovidiu Panait wrote:
> Hi,
> 
> On 8/19/25 9:12 AM, T Pratham wrote:
>> Add support for ECB and CBC modes in the AES Engine of the DTHE V2
>> hardware cryptography engine.
>>
>> Signed-off-by: T Pratham <t-pratham@xxxxxx>
>> ---
>>  MAINTAINERS                       |   1 +
>>  drivers/crypto/Kconfig            |   1 +
>>  drivers/crypto/Makefile           |   1 +
>>  drivers/crypto/ti/Kconfig         |  14 +
>>  drivers/crypto/ti/Makefile        |   3 +
>>  drivers/crypto/ti/dthev2-aes.c    | 411 ++++++++++++++++++++++++++++++
>>  drivers/crypto/ti/dthev2-common.c | 220 ++++++++++++++++
>>  drivers/crypto/ti/dthev2-common.h | 101 ++++++++
>>  8 files changed, 752 insertions(+)
>>  create mode 100644 drivers/crypto/ti/Kconfig
>>  create mode 100644 drivers/crypto/ti/Makefile
>>  create mode 100644 drivers/crypto/ti/dthev2-aes.c
>>  create mode 100644 drivers/crypto/ti/dthev2-common.c
>>  create mode 100644 drivers/crypto/ti/dthev2-common.h
>>
> 
> [...]
> 

[...]

>> +
>> +probe_reg_err:
>> +	crypto_engine_stop(dev_data->engine);
>> +probe_engine_start_err:
>> +	crypto_engine_exit(dev_data->engine);
> 
> crypto_engine_exit() calls crypto_engine_stop() internally, so there is
> no need to call both functions here. Just use crypto_engine_exit().
> 
> /**
>  * crypto_engine_exit - free the resources of hardware engine when exit
>  * @engine: the hardware engine need to be freed
>  */
> void crypto_engine_exit(struct crypto_engine *engine)
> {
> 	int ret;
> 
> 	ret = crypto_engine_stop(engine);
> 	if (ret)
> 		return;
> 
> 	kthread_destroy_worker(engine->kworker);
> }
> 

Thanks for this insight! Will correct this.

[...]

> 
> Ovidiu

Regards
T Pratham





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux