Re: [PATCH] crypto: cavium: zip: register algorithm only if hardware is present

From: Herbert Xu
Date: Wed Mar 02 2022 - 19:00:13 EST


On Mon, Feb 21, 2022 at 11:52:34AM +0000, Corentin Labbe wrote:
> On my renesas salavator-X, I saw some cavium driver failing crypto
> self-tests.
> But salvator does not have such hardware.
> This is due to cavium/zip driver registering algorithms even if hardware
> is not present.
> The solution is to move algorithm registration in the probe function.
> This permits also to simplify module init/exit by using
> module_pci_driver.
>
> Signed-off-by: Corentin Labbe <clabbe@xxxxxxxxxxxx>
> ---
>
> WARNING: this is boot tested only on salvator-X to be sure that the
> cavium/zip driver no longer registers algorithms.
> I do not have any cavium hardware unfortunatly.
>
> drivers/crypto/cavium/zip/zip_main.c | 83 ++++++++++++----------------
> 1 file changed, 35 insertions(+), 48 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt