]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: nx - don't abuse shash MAY_SLEEP flag
authorEric Biggers <ebiggers@google.com>
Mon, 15 Apr 2019 00:37:08 +0000 (17:37 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 25 Apr 2019 07:38:12 +0000 (15:38 +0800)
commit6f112405b868695c6d0c536cbf7397fa2543ba16
treec510c4f57ee5f8b761b7d315088702dbb5677871
parent636bc9148c087e05ec67d4d3014bb8e25f1eb946
crypto: nx - don't abuse shash MAY_SLEEP flag

The nx driver uses the MAY_SLEEP flag in shash_desc::flags as an
indicator to not retry sending the operation to the hardware as many
times before returning -EBUSY.  This is bogus because (1) that's not
what the MAY_SLEEP flag is for, and (2) the shash API doesn't allow
failing if the hardware is busy anyway.

For now, just make it always retry the larger number of times.  This
doesn't actually fix this driver, but it at least makes it not use the
shash_desc::flags field anymore.  Then this field can be removed, as no
other drivers use it.

Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/nx/nx-aes-xcbc.c
drivers/crypto/nx/nx-sha256.c
drivers/crypto/nx/nx-sha512.c