• Harald Freudenberger's avatar
    s390/ap/zcrypt: revisit ap and zcrypt error handling · e0332629
    Harald Freudenberger authored
    Revisit the ap queue error handling: Based on discussions and
    evaluatios with the firmware folk here is now a rework of the response
    code handling for all the AP instructions. The idea is to distinguish
    between failures because of some kind of invalid request where a retry
    does not make any sense and a failure where another attempt to send
    the very same request may succeed. The first case is handled by
    returning EINVAL to the userspace application. The second case results
    in retries within the zcrypt API controlled by a per message retry
    counter.
    
    Revisit the zcrpyt error handling: Similar here, based on discussions
    with the firmware people here comes a rework of the handling of all
    the reply codes.  Main point here is that there are only very few
    cases left, where a zcrypt device queue is switched to offline. It
    should never be the case that an AP reply message is 'unknown' to the
    device driver as it indicates a total mismatch between device driver
    and crypto card firmware. In all other cases, the code distinguishes
    between failure because of invalid message (see above - EINVAL) or
    failures of the infrastructure (see above - EAGAIN).
    Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
    Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
    e0332629
ap_queue.c 22.7 KB