[v3 PATCH] crypto: stm32 - Save and restore between each request

Linus Walleij linus.walleij at linaro.org
Mon Feb 27 13:28:36 PST 2023


On Mon, Feb 27, 2023 at 10:17 PM Linus Walleij <linus.walleij at linaro.org> wrote:

> I am trying to debug!

I am confused by the use of the state flag HASH_FLAGS_INIT in this
driver.

In stm32_hash_write_ctrl() that set up all the algorithm properties
this flag seems to mean "initialized the control register", as it sets
the flag after initializing the register and then does not write it
again if the flag is set.

I wonder if this is in line with the crypto driver expectations of that
flag.

I am wondering because at the end stm32_hash_dma_send()
you set this flag, and that function calls
stm32_hash_write_ctrl() first thing it does which will set the flag
unless it was set already.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list