linux/drivers/net/ethernet/brocade/bna/bnad_debugfs.c

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

#include <linux/debugfs.h>
#include <linux/module.h>
#include "bnad.h"

/*
 * BNA debufs interface
 *
 * To access the interface, debugfs file system should be mounted
 * if not already mounted using:
 *	mount -t debugfs none /sys/kernel/debug
 *
 * BNA Hierarchy:
 *	- bna/pci_dev:<pci_name>
 * where the pci_name corresponds to the one under /sys/bus/pci/drivers/bna
 *
 * Debugging service available per pci_dev:
 *	fwtrc:  To collect current firmware 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 bnad_debug_info {};

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

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

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

static int
bnad_get_debug_drvinfo(struct bnad *bnad, void *buffer, u32 len)
{}

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

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

static ssize_t
bnad_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)

/*
 * Function to check if the register offset passed is valid.
 */
static int
bna_reg_offset_check(struct bfa_ioc *ioc, u32 offset, u32 len)
{}

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

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

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

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

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

static const struct file_operations bnad_debugfs_op_fwtrc =;

static const struct file_operations bnad_debugfs_op_fwsave =;

static const struct file_operations bnad_debugfs_op_regrd =;

static const struct file_operations bnad_debugfs_op_regwr =;

static const struct file_operations bnad_debugfs_op_drvinfo =;

struct bnad_debugfs_entry {};

static const struct bnad_debugfs_entry bnad_debugfs_files[] =;

static struct dentry *bna_debugfs_root;
static atomic_t bna_debugfs_port_count;

/* Initialize debugfs interface for BNA */
void
bnad_debugfs_init(struct bnad *bnad)
{}

/* Uninitialize debugfs interface for BNA */
void
bnad_debugfs_uninit(struct bnad *bnad)
{}