diff options
author | Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com> | 2014-07-14 17:11:48 (GMT) |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-07-16 08:48:12 (GMT) |
commit | 666e68e0dde826ae146b980099f1719f74fa968c (patch) | |
tree | 5eb5b109401b195ff6f17064a74dcda7b9116b50 /drivers/s390/crypto | |
parent | dab6cf55f81a6e16b8147aed9a843e1691dcd318 (diff) | |
download | linux-666e68e0dde826ae146b980099f1719f74fa968c.tar.xz |
s390/zcrypt: improve device probing for zcrypt adapter cards
Improve device probing process for zcrypt adapters to
transmit service request during registration process.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto')
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 69ef4f8..4038437 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -901,10 +901,15 @@ static int ap_device_probe(struct device *dev) int rc; ap_dev->drv = ap_drv; + + spin_lock_bh(&ap_device_list_lock); + list_add(&ap_dev->list, &ap_device_list); + spin_unlock_bh(&ap_device_list_lock); + rc = ap_drv->probe ? ap_drv->probe(ap_dev) : -ENODEV; - if (!rc) { + if (rc) { spin_lock_bh(&ap_device_list_lock); - list_add(&ap_dev->list, &ap_device_list); + list_del_init(&ap_dev->list); spin_unlock_bh(&ap_device_list_lock); } return rc; |