// SPDX-License-Identifier: GPL-2.0 /* * Debugfs interface Support for MPT (Message Passing Technology) based * controllers. * * Copyright (C) 2020 Broadcom Inc. * * Authors: Broadcom Inc. * Sreekanth Reddy <[email protected]> * Suganath Prabu <[email protected]> * * Send feedback to : [email protected]) * **/ #include <linux/kernel.h> #include <linux/types.h> #include <linux/pci.h> #include <linux/interrupt.h> #include <linux/compat.h> #include <linux/uio.h> #include <scsi/scsi.h> #include <scsi/scsi_device.h> #include <scsi/scsi_host.h> #include "mpt3sas_base.h" #include <linux/debugfs.h> static struct dentry *mpt3sas_debugfs_root; /* * _debugfs_iocdump_read - copy ioc dump from debugfs buffer * @filep: File Pointer * @ubuf: Buffer to fill data * @cnt: Length of the buffer * @ppos: Offset in the file */ static ssize_t _debugfs_iocdump_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) { … } /* * _debugfs_iocdump_open : open the ioc_dump debugfs attribute file */ static int _debugfs_iocdump_open(struct inode *inode, struct file *file) { … } /* * _debugfs_iocdump_release : release the ioc_dump debugfs attribute * @inode: inode structure to the corresponds device * @file: File pointer */ static int _debugfs_iocdump_release(struct inode *inode, struct file *file) { … } static const struct file_operations mpt3sas_debugfs_iocdump_fops = …; /* * mpt3sas_init_debugfs : Create debugfs root for mpt3sas driver */ void mpt3sas_init_debugfs(void) { … } /* * mpt3sas_exit_debugfs : Remove debugfs root for mpt3sas driver */ void mpt3sas_exit_debugfs(void) { … } /* * mpt3sas_setup_debugfs : Setup debugfs per HBA adapter * ioc: MPT3SAS_ADAPTER object */ void mpt3sas_setup_debugfs(struct MPT3SAS_ADAPTER *ioc) { … } /* * mpt3sas_destroy_debugfs : Destroy debugfs per HBA adapter * @ioc: MPT3SAS_ADAPTER object */ void mpt3sas_destroy_debugfs(struct MPT3SAS_ADAPTER *ioc) { … }