linux/drivers/scsi/bfa/bfad_debugfs.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
 * Copyright (c) 2014- QLogic Corporation.
 * All rights reserved
 * www.qlogic.com
 *
 * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter.
 */

#include <linux/debugfs.h>
#include <linux/export.h>

#include "bfad_drv.h"
#include "bfad_im.h"

/*
 * BFA debufs interface
 *
 * To access the interface, debugfs file system should be mounted
 * if not already mounted using:
 * mount -t debugfs none /sys/kernel/debug
 *
 * BFA Hierarchy:
 *	- bfa/pci_dev:<pci_name>
 * where the pci_name corresponds to the one under /sys/bus/pci/drivers/bfa
 *
 * Debugging service available per pci_dev:
 * fwtrc:  To collect current firmware trace.
 * drvtrc: To collect current driver trace
 * fwsave: To collect last saved fw trace as a result of firmware crash.
 * regwr:  To write one word to chip register
 * regrd:  To read one or more words from chip register.
 */

struct bfad_debug_info {};

static int
bfad_debugfs_open_drvtrc(struct inode *inode, struct file *file)
{}

static int
bfad_debugfs_open_fwtrc(struct inode *inode, struct file *file)
{}

static int
bfad_debugfs_open_fwsave(struct inode *inode, struct file *file)
{}

static int
bfad_debugfs_open_reg(struct inode *inode, struct file *file)
{}

/* Changes the current file position */
static loff_t
bfad_debugfs_lseek(struct file *file, loff_t offset, int orig)
{}

static ssize_t
bfad_debugfs_read(struct file *file, char __user *buf,
			size_t nbytes, loff_t *pos)
{}

#define BFA_REG_CT_ADDRSZ
#define BFA_REG_CB_ADDRSZ
#define BFA_REG_ADDRSZ(__ioc)
#define BFA_REG_ADDRMSK(__ioc)

static bfa_status_t
bfad_reg_offset_check(struct bfa_s *bfa, u32 offset, u32 len)
{}

static ssize_t
bfad_debugfs_read_regrd(struct file *file, char __user *buf,
		size_t nbytes, loff_t *pos)
{}

static ssize_t
bfad_debugfs_write_regrd(struct file *file, const char __user *buf,
		size_t nbytes, loff_t *ppos)
{}

static ssize_t
bfad_debugfs_write_regwr(struct file *file, const char __user *buf,
		size_t nbytes, loff_t *ppos)
{}

static int
bfad_debugfs_release(struct inode *inode, struct file *file)
{}

static int
bfad_debugfs_release_fwtrc(struct inode *inode, struct file *file)
{}

static const struct file_operations bfad_debugfs_op_drvtrc =;

static const struct file_operations bfad_debugfs_op_fwtrc =;

static const struct file_operations bfad_debugfs_op_fwsave =;

static const struct file_operations bfad_debugfs_op_regrd =;

static const struct file_operations bfad_debugfs_op_regwr =;

struct bfad_debugfs_entry {};

static const struct bfad_debugfs_entry bfad_debugfs_files[] =;

static struct dentry *bfa_debugfs_root;
static atomic_t bfa_debugfs_port_count;

inline void
bfad_debugfs_init(struct bfad_port_s *port)
{}

inline void
bfad_debugfs_exit(struct bfad_port_s *port)
{}