diff options
author | Harald Freudenberger <freude@linux.vnet.ibm.com> | 2016-11-24 08:45:21 +0300 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-12-14 18:33:39 +0300 |
commit | cccd85bfb7bf6787302435c669ceec23b5a5301c (patch) | |
tree | c646f0474f1344372596c37adff268dbdb4f07c3 /drivers/s390/crypto/zcrypt_queue.c | |
parent | bf9f31190aa176c43c15cf58b60818d325e0f851 (diff) | |
download | linux-cccd85bfb7bf6787302435c669ceec23b5a5301c.tar.xz |
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_queue.c')
-rw-r--r-- | drivers/s390/crypto/zcrypt_queue.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/s390/crypto/zcrypt_queue.c b/drivers/s390/crypto/zcrypt_queue.c index c70b2528d9a3..a303f3b2c328 100644 --- a/drivers/s390/crypto/zcrypt_queue.c +++ b/drivers/s390/crypto/zcrypt_queue.c @@ -70,9 +70,12 @@ static ssize_t zcrypt_queue_online_store(struct device *dev, if (online && !zc->online) return -EINVAL; zq->online = online; - ZCRYPT_DBF_DEV(DBF_INFO, zq, "dev%02x%04xo%dman", - AP_QID_CARD(zq->queue->qid), - AP_QID_QUEUE(zq->queue->qid), online); + + ZCRYPT_DBF(DBF_INFO, "queue=%02x.%04x online=%d\n", + AP_QID_CARD(zq->queue->qid), + AP_QID_QUEUE(zq->queue->qid), + online); + if (!online) ap_flush_queue(zq->queue); return count; @@ -109,7 +112,6 @@ struct zcrypt_queue *zcrypt_queue_alloc(size_t max_response_size) goto out_free; zq->reply.length = max_response_size; INIT_LIST_HEAD(&zq->list); - zq->dbf_area = zcrypt_dbf_devices; kref_init(&zq->refcount); return zq; @@ -161,10 +163,10 @@ int zcrypt_queue_register(struct zcrypt_queue *zq) zcrypt_card_get(zc); zq->zcard = zc; zq->online = 1; /* New devices are online by default. */ - ZCRYPT_DBF_DEV(DBF_INFO, zq, "dev%02x%04xo%dreg", - AP_QID_CARD(zq->queue->qid), - AP_QID_QUEUE(zq->queue->qid), - zq->online); + + ZCRYPT_DBF(DBF_INFO, "queue=%02x.%04x register online=1\n", + AP_QID_CARD(zq->queue->qid), AP_QID_QUEUE(zq->queue->qid)); + list_add_tail(&zq->list, &zc->zqueues); zcrypt_device_count++; spin_unlock(&zcrypt_list_lock); @@ -205,6 +207,9 @@ void zcrypt_queue_unregister(struct zcrypt_queue *zq) { struct zcrypt_card *zc; + ZCRYPT_DBF(DBF_INFO, "queue=%02x.%04x unregister\n", + AP_QID_CARD(zq->queue->qid), AP_QID_QUEUE(zq->queue->qid)); + zc = zq->zcard; spin_lock(&zcrypt_list_lock); list_del_init(&zq->list); |