crypto: hisilicon/hpre - save capability registers in probe process
authorZhiqi Song <songzhiqi1@huawei.com>
Sat, 2 Dec 2023 09:17:20 +0000 (17:17 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 Dec 2023 03:59:45 +0000 (11:59 +0800)
commitcf8b5156bbc8c9376f699e8d35e9464b739e33ff
tree5c5611b0187505d5a4f37edd425f8e68363d91ba
parentcabe13d0bd2efb8dd50ed2310f57b33e1a69a0d4
crypto: hisilicon/hpre - save capability registers in probe process

Pre-store the valid value of hpre alg support related capability
register in hpre_qm_init(), which will be called by hpre_probe().
It can reduce the number of capability register queries and avoid
obtaining incorrect values in abnormal scenarios, such as reset
failed and the memory space disabled.

Fixes: f214d59a0603 ("crypto: hisilicon/hpre - support hpre capability")
Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/hpre/hpre_main.c