s390/zcrypt: don't report online if card or queue is in check-stop state
authorIngo Franzki <ifranzki@linux.ibm.com>
Thu, 26 Oct 2023 09:24:03 +0000 (11:24 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Sun, 5 Nov 2023 21:34:57 +0000 (22:34 +0100)
commitcfaef6516e9ac64e36967bd74d173b67fef6eee4
treed2abbf51f9248355a6d23337e79232e0eb83e041
parentaa44433ac4ee2ae59b4b11e01eddb6241ae24ef5
s390/zcrypt: don't report online if card or queue is in check-stop state

If a card or a queue is in check-stop state, it can't be used by
applications to perform crypto operations. Applications check the 'online'
sysfs attribute to check if a card or queue is usable.

Report a card or queue as offline in case it is in check-stop state.
Furthermore, don't allow to set a card or queue online, if it is in
check-stop state.

This is similar to when the card or the queue is in deconfigured state,
there it is also reported as being offline, and it can't be set online.

Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/crypto/zcrypt_card.c
drivers/s390/crypto/zcrypt_queue.c