diff options
author | Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com> | 2014-07-14 13:11:48 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-07-16 04:48:12 -0400 |
commit | 666e68e0dde826ae146b980099f1719f74fa968c (patch) | |
tree | 5eb5b109401b195ff6f17064a74dcda7b9116b50 /drivers/s390 | |
parent | dab6cf55f81a6e16b8147aed9a843e1691dcd318 (diff) |
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')
-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 69ef4f8cfac8..4038437ff033 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) | |||
901 | int rc; | 901 | int rc; |
902 | 902 | ||
903 | ap_dev->drv = ap_drv; | 903 | ap_dev->drv = ap_drv; |
904 | |||
905 | spin_lock_bh(&ap_device_list_lock); | ||
906 | list_add(&ap_dev->list, &ap_device_list); | ||
907 | spin_unlock_bh(&ap_device_list_lock); | ||
908 | |||
904 | rc = ap_drv->probe ? ap_drv->probe(ap_dev) : -ENODEV; | 909 | rc = ap_drv->probe ? ap_drv->probe(ap_dev) : -ENODEV; |
905 | if (!rc) { | 910 | if (rc) { |
906 | spin_lock_bh(&ap_device_list_lock); | 911 | spin_lock_bh(&ap_device_list_lock); |
907 | list_add(&ap_dev->list, &ap_device_list); | 912 | list_del_init(&ap_dev->list); |
908 | spin_unlock_bh(&ap_device_list_lock); | 913 | spin_unlock_bh(&ap_device_list_lock); |
909 | } | 914 | } |
910 | return rc; | 915 | return rc; |