]> git.baikalelectronics.ru Git - kernel.git/commit
s390/ap: fix state machine hang after failure to enable irq
authorHarald Freudenberger <freude@linux.ibm.com>
Wed, 25 Aug 2021 08:55:02 +0000 (10:55 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 26 Aug 2021 18:22:12 +0000 (20:22 +0200)
commit25c1c8f4d641fa7b47b7f5beb52d9411e0502947
tree3a3cd3726ed8e633dc96f68fafd987dc402450ce
parent1308929d213b0ba0810640d7515f6cf573b6e7de
s390/ap: fix state machine hang after failure to enable irq

If for any reason the interrupt enable for an ap queue fails the
state machine run for the queue returned wrong return codes to the
caller. So the caller assumed interrupt support for this queue in
enabled and thus did not re-establish the high resolution timer used
for polling. In the end this let to a hang for the user space process
waiting "forever" for the reply.

This patch reworks these return codes to return correct indications
for the caller to re-establish the timer when a queue runs without
interrupt support.

Please note that this is fixing a wrong behavior after a first
failure (enable interrupt support for the queue) failed. However,
looks like this occasionally happens on KVM systems.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/crypto/ap_bus.c
drivers/s390/crypto/ap_bus.h
drivers/s390/crypto/ap_queue.c