]> git.baikalelectronics.ru Git - kernel.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)
commitc2a0098d2b995545136c79c461a3f221160163dc
tree2902a080a58180da1d8949f85a905b91943b725d
parent2bf44df01d16ef3595319c2cdbae5346e4a48c82
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