crypto: stm32/crc32 - Avoid lock if hardware is already used
authorNicolas Toromanoff <nicolas.toromanoff@st.com>
Wed, 16 Sep 2020 06:33:44 +0000 (08:33 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 25 Sep 2020 07:48:14 +0000 (17:48 +1000)
commitbbf2cb1ea1e1428589d7f4d652bed15b265ce92d
treecec14bb4328b0a7f435453ad1a9cfdb515a0af98
parentc4c75fcbd8b9cc9c9fcddcb8ee68ab680d486c01
crypto: stm32/crc32 - Avoid lock if hardware is already used

If STM32 CRC device is already in use, calculate CRC by software.

This will release CPU constraint for a concurrent access to the
hardware, and avoid masking irqs during the whole block processing.

Fixes: 7795c0baf5ac ("crypto: stm32/crc32 - protect from concurrent accesses")

Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/stm32/Kconfig
drivers/crypto/stm32/stm32-crc32.c