s390/ap: add debug possibility for AP messages
authorHarald Freudenberger <freude@linux.ibm.com>
Fri, 9 Feb 2024 15:14:23 +0000 (16:14 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 16 Feb 2024 13:30:13 +0000 (14:30 +0100)
This patch introduces two dynamic debug hexdump
invocation possibilities to be able to a) dump an
AP message immediately before it goes into the
firmware queue and b) dump a fresh from the
firmware queue received AP message.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/crypto/ap_queue.c

index d8268fee3bd5ccb92922700b9d06b3b44ec4f6b5..6e4e8d324a6def068638e3418b8e9beef70a098f 100644 (file)
@@ -136,6 +136,8 @@ static struct ap_queue_status ap_sm_recv(struct ap_queue *aq)
 
        switch (status.response_code) {
        case AP_RESPONSE_NORMAL:
+               print_hex_dump_debug("aprpl: ", DUMP_PREFIX_ADDRESS, 16, 1,
+                                    aq->reply->msg, aq->reply->len, false);
                aq->queue_count = max_t(int, 0, aq->queue_count - 1);
                if (!status.queue_empty && !aq->queue_count)
                        aq->queue_count++;
@@ -246,6 +248,8 @@ static enum ap_sm_wait ap_sm_write(struct ap_queue *aq)
 
        /* Start the next request on the queue. */
        ap_msg = list_entry(aq->requestq.next, struct ap_message, list);
+       print_hex_dump_debug("apreq: ", DUMP_PREFIX_ADDRESS, 16, 1,
+                            ap_msg->msg, ap_msg->len, false);
        status = __ap_send(qid, ap_msg->psmid,
                           ap_msg->msg, ap_msg->len,
                           ap_msg->flags & AP_MSG_FLAG_SPECIAL);