diff options
author | Harald Freudenberger <freude@linux.ibm.com> | 2019-11-22 16:30:06 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-01-09 16:59:18 +0100 |
commit | 0c874cd04292c7ee22d70eefc341fa2648f41f46 (patch) | |
tree | 2902a080a58180da1d8949f85a905b91943b725d /drivers/s390/crypto/zcrypt_cex2a.c | |
parent | 94dd3bada53ee77b80d0aeee5571eeb83654d156 (diff) | |
download | lwn-0c874cd04292c7ee22d70eefc341fa2648f41f46.tar.gz lwn-0c874cd04292c7ee22d70eefc341fa2648f41f46.zip |
s390/zcrypt: move ap device reset from bus to driver code
This patch moves the reset invocation of an ap device when
fresh detected from the ap bus to the probe() function of
the driver responsible for this device.
The virtualisation of ap devices makes it necessary to
remove unconditioned resets on fresh appearing apqn devices.
It may be that such a device is already enabled for guest
usage. So there may be a race condition between host ap bus
and guest ap bus doing the reset. This patch moves the
reset from the ap bus to the zcrypt drivers. So if there
is no zcrypt driver bound to an ap device - for example
the ap device is bound to the vfio device driver - the
ap device is untouched passed to the vfio device driver.
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_cex2a.c')
-rw-r--r-- | drivers/s390/crypto/zcrypt_cex2a.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_cex2a.c b/drivers/s390/crypto/zcrypt_cex2a.c index c50f3e86cc74..7cbb384ec535 100644 --- a/drivers/s390/crypto/zcrypt_cex2a.c +++ b/drivers/s390/crypto/zcrypt_cex2a.c @@ -175,6 +175,7 @@ static int zcrypt_cex2a_queue_probe(struct ap_device *ap_dev) zq->queue = aq; zq->online = 1; atomic_set(&zq->load, 0); + ap_queue_init_state(aq); ap_queue_init_reply(aq, &zq->reply); aq->request_timeout = CEX2A_CLEANUP_TIME, aq->private = zq; |