Skip to content

Commit

Permalink
s390/zcrypt: improve device probing for zcrypt adapter cards
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Tuchscherer authored and Martin Schwidefsky committed Jul 16, 2014
1 parent dab6cf5 commit 666e68e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/s390/crypto/ap_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 666e68e

Please sign in to comment.