mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
To: linux-kernel@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Gerald Schaefer <gerald.schaefer@de.ibm.com>,
	Heiko Carstens <heicars2@linux.vnet.ibm.com>,
	Torsten Duwe <duwe@suse.de>,
	Hendrik Brueckner <brueckner@de.ibm.com>,
	Matt Mackall <mpm@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Harald Freudenberger <freude@de.ibm.com>,
	Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Subject: 
Date: Tue, 15 Jul 2014 09:34:16 +0200	[thread overview]
Message-ID: <1405409656-45117-1-git-send-email-ingo.tuchscherer@de.ibm.com> (raw)

Subject: 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>

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;


                 reply	other threads:[~2014-07-15  7:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1405409656-45117-1-git-send-email-ingo.tuchscherer@de.ibm.com \
    --to=ingo.tuchscherer@de.ibm.com \
    --cc=brueckner@de.ibm.com \
    --cc=duwe@suse.de \
    --cc=freude@de.ibm.com \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=heicars2@linux.vnet.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=ingo.tuchscherer@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®