]> git.baikalelectronics.ru Git - kernel.git/commit
s390/zcrypt: use new state UNBOUND during queue driver rebind
authorHarald Freudenberger <freude@linux.ibm.com>
Tue, 5 Feb 2019 16:22:36 +0000 (17:22 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 13 Feb 2019 07:27:44 +0000 (08:27 +0100)
commitb0f0a0bed91fbe9b80433bf1d7ff8057a53d9b28
tree6546e4303c4bf211a58a9fade03abb7ed3602b11
parent41256ad90d4718b60dd5cb2aa90ee1835198d678
s390/zcrypt: use new state UNBOUND during queue driver rebind

When an alternate driver (vfio-ap) has bound an ap queue and this
binding is revised the ap queue device is in an intermittent
state not bound to any driver. The internal state variable
covered this with the state AP_STATE_BORKED which is also used to
reflect broken devices. When now an ap bus scan runs such a
device is destroyed and on the next scan reconstructed.

So a stress test with high frequency switching the queue driver
between the default and the vfio-ap driver hit this gap and the
queue was removed until the next ap bus scan. This fix now
introduces another state for the in-between condition for a queue
momentary not bound to a driver and so the ap bus scan function
skips this device instead of removing it.

Also some very slight but maybe helpful debug feature messages
come with this patch - in particular a message showing that a
broken card/queue device will get removed.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/crypto/ap_bus.c
drivers/s390/crypto/ap_bus.h
drivers/s390/crypto/ap_queue.c