Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * QLogic iSCSI Offload Driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  * Copyright (c) 2016 Cavium Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #include "qedi.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include "qedi_dbg.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/uaccess.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <linux/debugfs.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) int qedi_do_not_recover;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) static struct dentry *qedi_dbg_root;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) qedi_dbg_host_init(struct qedi_dbg_ctx *qedi,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 		   const struct qedi_debugfs_ops *dops,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 		   const struct file_operations *fops)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	char host_dirname[32];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	sprintf(host_dirname, "host%u", qedi->host_no);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	qedi->bdf_dentry = debugfs_create_dir(host_dirname, qedi_dbg_root);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	while (dops) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 		if (!(dops->name))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 		debugfs_create_file(dops->name, 0600, qedi->bdf_dentry, qedi,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 				    fops);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 		dops++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 		fops++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) qedi_dbg_host_exit(struct qedi_dbg_ctx *qedi)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	debugfs_remove_recursive(qedi->bdf_dentry);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	qedi->bdf_dentry = NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) qedi_dbg_init(char *drv_name)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	qedi_dbg_root = debugfs_create_dir(drv_name, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) qedi_dbg_exit(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	debugfs_remove_recursive(qedi_dbg_root);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	qedi_dbg_root = NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) static ssize_t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) qedi_dbg_do_not_recover_enable(struct qedi_dbg_ctx *qedi_dbg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	if (!qedi_do_not_recover)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		qedi_do_not_recover = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	QEDI_INFO(qedi_dbg, QEDI_LOG_DEBUGFS, "do_not_recover=%d\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 		  qedi_do_not_recover);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) static ssize_t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) qedi_dbg_do_not_recover_disable(struct qedi_dbg_ctx *qedi_dbg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	if (qedi_do_not_recover)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 		qedi_do_not_recover = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	QEDI_INFO(qedi_dbg, QEDI_LOG_DEBUGFS, "do_not_recover=%d\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		  qedi_do_not_recover);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) static struct qedi_list_of_funcs qedi_dbg_do_not_recover_ops[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	{ "enable", qedi_dbg_do_not_recover_enable },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	{ "disable", qedi_dbg_do_not_recover_disable },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	{ NULL, NULL }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) const struct qedi_debugfs_ops qedi_debugfs_ops[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	{ "gbl_ctx", NULL },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	{ "do_not_recover", qedi_dbg_do_not_recover_ops},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	{ "io_trace", NULL },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	{ NULL, NULL }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) static ssize_t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) qedi_dbg_do_not_recover_cmd_write(struct file *filp, const char __user *buffer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 				  size_t count, loff_t *ppos)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	size_t cnt = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	struct qedi_dbg_ctx *qedi_dbg =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 			(struct qedi_dbg_ctx *)filp->private_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	struct qedi_list_of_funcs *lof = qedi_dbg_do_not_recover_ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	if (*ppos)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	while (lof) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 		if (!(lof->oper_str))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		if (!strncmp(lof->oper_str, buffer, strlen(lof->oper_str))) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 			cnt = lof->oper_func(qedi_dbg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 			break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 		lof++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	return (count - cnt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) static ssize_t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) qedi_dbg_do_not_recover_cmd_read(struct file *filp, char __user *buffer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 				 size_t count, loff_t *ppos)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	size_t cnt = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	if (*ppos)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	cnt = sprintf(buffer, "do_not_recover=%d\n", qedi_do_not_recover);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	cnt = min_t(int, count, cnt - *ppos);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	*ppos += cnt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	return cnt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) static int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) qedi_gbl_ctx_show(struct seq_file *s, void *unused)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	struct qedi_fastpath *fp = NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	struct qed_sb_info *sb_info = NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	struct status_block_e4 *sb = NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	struct global_queue *que = NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	int id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	u16 prod_idx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	struct qedi_ctx *qedi = s->private;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	unsigned long flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	seq_puts(s, " DUMP CQ CONTEXT:\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	for (id = 0; id < MIN_NUM_CPUS_MSIX(qedi); id++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 		spin_lock_irqsave(&qedi->hba_lock, flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 		seq_printf(s, "=========FAST CQ PATH [%d] ==========\n", id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 		fp = &qedi->fp_array[id];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 		sb_info = fp->sb_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 		sb = sb_info->sb_virt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 		prod_idx = (sb->pi_array[QEDI_PROTO_CQ_PROD_IDX] &
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 			    STATUS_BLOCK_E4_PROD_INDEX_MASK);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		seq_printf(s, "SB PROD IDX: %d\n", prod_idx);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 		que = qedi->global_queues[fp->sb_id];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 		seq_printf(s, "DRV CONS IDX: %d\n", que->cq_cons_idx);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 		seq_printf(s, "CQ complete host memory: %d\n", fp->sb_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 		seq_puts(s, "=========== END ==================\n\n\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		spin_unlock_irqrestore(&qedi->hba_lock, flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) static int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) qedi_dbg_gbl_ctx_open(struct inode *inode, struct file *file)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	struct qedi_dbg_ctx *qedi_dbg = inode->i_private;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	struct qedi_ctx *qedi = container_of(qedi_dbg, struct qedi_ctx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 					     dbg_ctx);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	return single_open(file, qedi_gbl_ctx_show, qedi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) static int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) qedi_io_trace_show(struct seq_file *s, void *unused)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	int id, idx = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	struct qedi_ctx *qedi = s->private;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	struct qedi_io_log *io_log;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	unsigned long flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	seq_puts(s, " DUMP IO LOGS:\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	spin_lock_irqsave(&qedi->io_trace_lock, flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	idx = qedi->io_trace_idx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	for (id = 0; id < QEDI_IO_TRACE_SIZE; id++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		io_log = &qedi->io_trace_buf[idx];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 		seq_printf(s, "iodir-%d:", io_log->direction);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 		seq_printf(s, "tid-0x%x:", io_log->task_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 		seq_printf(s, "cid-0x%x:", io_log->cid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 		seq_printf(s, "lun-%d:", io_log->lun);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 		seq_printf(s, "op-0x%02x:", io_log->op);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 		seq_printf(s, "0x%02x%02x%02x%02x:", io_log->lba[0],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 			   io_log->lba[1], io_log->lba[2], io_log->lba[3]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		seq_printf(s, "buflen-%d:", io_log->bufflen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 		seq_printf(s, "sgcnt-%d:", io_log->sg_count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 		seq_printf(s, "res-0x%08x:", io_log->result);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 		seq_printf(s, "jif-%lu:", io_log->jiffies);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 		seq_printf(s, "blk_req_cpu-%d:", io_log->blk_req_cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 		seq_printf(s, "req_cpu-%d:", io_log->req_cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 		seq_printf(s, "intr_cpu-%d:", io_log->intr_cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 		seq_printf(s, "blk_rsp_cpu-%d\n", io_log->blk_rsp_cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 		idx++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 		if (idx == QEDI_IO_TRACE_SIZE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 			idx = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	spin_unlock_irqrestore(&qedi->io_trace_lock, flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) static int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) qedi_dbg_io_trace_open(struct inode *inode, struct file *file)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	struct qedi_dbg_ctx *qedi_dbg = inode->i_private;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	struct qedi_ctx *qedi = container_of(qedi_dbg, struct qedi_ctx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 					     dbg_ctx);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	return single_open(file, qedi_io_trace_show, qedi);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) const struct file_operations qedi_dbg_fops[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	qedi_dbg_fileops_seq(qedi, gbl_ctx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	qedi_dbg_fileops(qedi, do_not_recover),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	qedi_dbg_fileops_seq(qedi, io_trace),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	{ },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) };