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>
This commit is contained in:

committed by
Vasily Gorbik

parent
94dd3bada5
commit
0c874cd042
@@ -793,8 +793,6 @@ static int ap_device_probe(struct device *dev)
|
||||
drvres = ap_drv->flags & AP_DRIVER_FLAG_DEFAULT;
|
||||
if (!!devres != !!drvres)
|
||||
return -ENODEV;
|
||||
/* (re-)init queue's state machine */
|
||||
ap_queue_reinit_state(to_ap_queue(dev));
|
||||
}
|
||||
|
||||
/* Add queue/card to list of active queues/cards */
|
||||
|
Reference in New Issue
Block a user