// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 1999 - 2018 Intel Corporation. */ #include <linux/debugfs.h> #include <linux/module.h> #include "ixgbe.h" static struct dentry *ixgbe_dbg_root; static char ixgbe_dbg_reg_ops_buf[256] = …; static ssize_t ixgbe_dbg_common_ops_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos, char *dbg_buf) { … } /** * ixgbe_dbg_reg_ops_read - read for reg_ops datum * @filp: the opened file * @buffer: where to write the data for the user to read * @count: the size of the user's buffer * @ppos: file position offset **/ static ssize_t ixgbe_dbg_reg_ops_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) { … } /** * ixgbe_dbg_reg_ops_write - write into reg_ops datum * @filp: the opened file * @buffer: where to find the user's data * @count: the length of the user's data * @ppos: file position offset **/ static ssize_t ixgbe_dbg_reg_ops_write(struct file *filp, const char __user *buffer, size_t count, loff_t *ppos) { … } static const struct file_operations ixgbe_dbg_reg_ops_fops = …; static char ixgbe_dbg_netdev_ops_buf[256] = …; /** * ixgbe_dbg_netdev_ops_read - read for netdev_ops datum * @filp: the opened file * @buffer: where to write the data for the user to read * @count: the size of the user's buffer * @ppos: file position offset **/ static ssize_t ixgbe_dbg_netdev_ops_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) { … } /** * ixgbe_dbg_netdev_ops_write - write into netdev_ops datum * @filp: the opened file * @buffer: where to find the user's data * @count: the length of the user's data * @ppos: file position offset **/ static ssize_t ixgbe_dbg_netdev_ops_write(struct file *filp, const char __user *buffer, size_t count, loff_t *ppos) { … } static const struct file_operations ixgbe_dbg_netdev_ops_fops = …; /** * ixgbe_dbg_adapter_init - setup the debugfs directory for the adapter * @adapter: the adapter that is starting up **/ void ixgbe_dbg_adapter_init(struct ixgbe_adapter *adapter) { … } /** * ixgbe_dbg_adapter_exit - clear out the adapter's debugfs entries * @adapter: the adapter that is exiting **/ void ixgbe_dbg_adapter_exit(struct ixgbe_adapter *adapter) { … } /** * ixgbe_dbg_init - start up debugfs for the driver **/ void ixgbe_dbg_init(void) { … } /** * ixgbe_dbg_exit - clean out the driver's debugfs entries **/ void ixgbe_dbg_exit(void) { … }