]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/zcrypt: move ap device reset from bus to driver code
authorHarald Freudenberger <freude@linux.ibm.com>
Fri, 22 Nov 2019 15:30:06 +0000 (16:30 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 9 Jan 2020 15:59:18 +0000 (16:59 +0100)
commit0c874cd04292c7ee22d70eefc341fa2648f41f46
tree2902a080a58180da1d8949f85a905b91943b725d
parent94dd3bada53ee77b80d0aeee5571eeb83654d156
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>
drivers/s390/crypto/ap_bus.c
drivers/s390/crypto/ap_bus.h
drivers/s390/crypto/ap_queue.c
drivers/s390/crypto/zcrypt_cex2a.c
drivers/s390/crypto/zcrypt_cex2c.c
drivers/s390/crypto/zcrypt_cex4.c