diff options
author | Harald Freudenberger <freude@linux.vnet.ibm.com> | 2016-11-24 06:45:21 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-12-14 16:33:39 +0100 |
commit | cccd85bfb7bf6787302435c669ceec23b5a5301c (patch) | |
tree | c646f0474f1344372596c37adff268dbdb4f07c3 /drivers/s390/crypto/zcrypt_card.c | |
parent | bf9f31190aa176c43c15cf58b60818d325e0f851 (diff) | |
download | lwn-cccd85bfb7bf6787302435c669ceec23b5a5301c.tar.gz lwn-cccd85bfb7bf6787302435c669ceec23b5a5301c.zip |
s390/zcrypt: Rework debug feature invocations.
Rework the debug feature calls and initialization. There
are now two debug feature entries used by the zcrypt code.
The first is 'ap' with all the AP bus related stuff and the
second is 'zcrypt' with all the zcrypt and devices and
driver related entries. However, there isn't much traffic on
both debug features. The ap bus code emits only some debug
info and for zcrypt devices on appearance and disappearance
there is an entry written.
The new dbf invocations use the sprintf buffer layout,
whereas the old implementation used the ascii dbf buffer.
There are now 5*8=40 bytes used for each entry, resulting in
5 parameters per call. As the sprintf buffer needs a format
string the first parameter provides this and so up to 4 more
parameters can be used. Alltogehter the new layout should be
much more human readable for customers and test.
Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_card.c')
-rw-r--r-- | drivers/s390/crypto/zcrypt_card.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/s390/crypto/zcrypt_card.c b/drivers/s390/crypto/zcrypt_card.c index 57873d775e95..53436ea52230 100644 --- a/drivers/s390/crypto/zcrypt_card.c +++ b/drivers/s390/crypto/zcrypt_card.c @@ -79,7 +79,9 @@ static ssize_t zcrypt_card_online_store(struct device *dev, zc->online = online; id = zc->card->id; - ZCRYPT_DBF_DEV(DBF_INFO, zc, "card%02xo%dman", id, online); + + ZCRYPT_DBF(DBF_INFO, "card=%02x online=%d\n", id, online); + spin_lock(&zcrypt_list_lock); list_for_each_entry(zq, &zc->zqueues, list) zcrypt_queue_force_online(zq, online); @@ -109,7 +111,6 @@ struct zcrypt_card *zcrypt_card_alloc(void) return NULL; INIT_LIST_HEAD(&zc->list); INIT_LIST_HEAD(&zc->zqueues); - zc->dbf_area = zcrypt_dbf_cards; kref_init(&zc->refcount); return zc; } @@ -160,6 +161,9 @@ int zcrypt_card_register(struct zcrypt_card *zc) spin_unlock(&zcrypt_list_lock); zc->online = 1; + + ZCRYPT_DBF(DBF_INFO, "card=%02x register online=1\n", zc->card->id); + return rc; } EXPORT_SYMBOL(zcrypt_card_register); @@ -172,6 +176,8 @@ EXPORT_SYMBOL(zcrypt_card_register); */ void zcrypt_card_unregister(struct zcrypt_card *zc) { + ZCRYPT_DBF(DBF_INFO, "card=%02x unregister\n", zc->card->id); + spin_lock(&zcrypt_list_lock); list_del_init(&zc->list); spin_unlock(&zcrypt_list_lock); |