• Antoine Tenart's avatar
    crypto: inside-secure - keep the requests push/pop synced · f7268c53
    Antoine Tenart authored
    This patch updates the Inside Secure SafeXcel driver to avoid being
    out-of-sync between the number of requests sent and the one being
    completed.
    
    The number of requests acknowledged by the driver can be different than
    the threshold that was configured if new requests were being pushed to
    the h/w in the meantime. The driver wasn't taking those into account,
    and the number of remaining requests to handled (to reconfigure the
    interrupt threshold) could be out-of sync.
    
    This patch fixes it by not taking in account the number of requests
    left, but by taking in account the total number of requests being sent
    to the hardware, so that new requests are being taken into account.
    
    Fixes: dc7e28a3 ("crypto: inside-secure - dequeue all requests at once")
    Suggested-by: default avatarOfer Heifetz <oferh@marvell.com>
    Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    f7268c53
safexcel.c 29.2 KB