[RFC PATCH 2/3] crypto: nx - don't abuse shash MAY_SLEEP flag
Michael Ellerman
mpe at ellerman.id.au
Mon Apr 15 15:12:51 AEST 2019
Eric Biggers <ebiggers at kernel.org> writes:
> From: Eric Biggers <ebiggers at google.com>
>
> 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.
Can you elaborate a bit on that 2nd point? What is the driver meant to
do if the hardware is busy or out to lunch? Retry forever?
> 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.
This looks fine to me, thanks for fixing it up.
cheers
More information about the Linuxppc-dev
mailing list