diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2020-02-24 09:53:47 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-03-06 11:37:41 +0100 |
commit | ad451abee4ba787508c2a344aae4c9316b96cab9 (patch) | |
tree | 556d786d54f08bb4f0425e5a0e04a0543ef3b575 /drivers/s390/cio | |
parent | 014b020475d4b9670d3cff11b751a7c20208f78b (diff) |
s390/qdio: export SSQD via debugfs
While we print out various SSQD fields at initialization time, having
raw & full access to the current SSQD can help with debugging.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/qdio_debug.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/s390/cio/qdio_debug.c b/drivers/s390/cio/qdio_debug.c index bf8d82503870..8544faddf80c 100644 --- a/drivers/s390/cio/qdio_debug.c +++ b/drivers/s390/cio/qdio_debug.c @@ -190,6 +190,23 @@ static int qstat_show(struct seq_file *m, void *v) DEFINE_SHOW_ATTRIBUTE(qstat); +static int ssqd_show(struct seq_file *m, void *v) +{ + struct ccw_device *cdev = m->private; + struct qdio_ssqd_desc ssqd; + int rc; + + rc = qdio_get_ssqd_desc(cdev, &ssqd); + if (rc) + return rc; + + seq_hex_dump(m, "", DUMP_PREFIX_NONE, 16, 4, &ssqd, sizeof(ssqd), + false); + return 0; +} + +DEFINE_SHOW_ATTRIBUTE(ssqd); + static char *qperf_names[] = { "Assumed adapter interrupts", "QDIO interrupts", @@ -303,6 +320,8 @@ void qdio_setup_debug_entries(struct qdio_irq *irq_ptr, struct ccw_device *cdev) debugfs_root); debugfs_create_file("statistics", S_IFREG | S_IRUGO | S_IWUSR, irq_ptr->debugfs_dev, irq_ptr, &debugfs_perf_fops); + debugfs_create_file("ssqd", 0444, irq_ptr->debugfs_dev, cdev, + &ssqd_fops); for_each_input_queue(irq_ptr, q, i) setup_debugfs_entry(irq_ptr->debugfs_dev, q); |