2 * Copyright 2012 Cisco Systems, Inc. All rights reserved.
4 * This program is free software; you may redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
9 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
11 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
12 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
13 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18 #include <linux/module.h>
19 #include <linux/errno.h>
20 #include <linux/debugfs.h>
21 #include <linux/vmalloc.h>
24 static struct dentry
*fnic_trace_debugfs_root
;
25 static struct dentry
*fnic_trace_debugfs_file
;
26 static struct dentry
*fnic_trace_enable
;
27 static struct dentry
*fnic_stats_debugfs_root
;
29 static struct dentry
*fnic_fc_trace_debugfs_file
;
30 static struct dentry
*fnic_fc_rdata_trace_debugfs_file
;
31 static struct dentry
*fnic_fc_trace_enable
;
32 static struct dentry
*fnic_fc_trace_clear
;
34 struct fc_trace_flag_type
{
42 static struct fc_trace_flag_type
*fc_trc_flag
;
45 * fnic_debugfs_init - Initialize debugfs for fnic debug logging
48 * When Debugfs is configured this routine sets up the fnic debugfs
49 * file system. If not already created, this routine will create the
50 * fnic directory and statistics directory for trace buffer and
53 int fnic_debugfs_init(void)
56 fnic_trace_debugfs_root
= debugfs_create_dir("fnic", NULL
);
57 if (!fnic_trace_debugfs_root
) {
58 printk(KERN_DEBUG
"Cannot create debugfs root\n");
62 if (!fnic_trace_debugfs_root
) {
64 "fnic root directory doesn't exist in debugfs\n");
68 fnic_stats_debugfs_root
= debugfs_create_dir("statistics",
69 fnic_trace_debugfs_root
);
70 if (!fnic_stats_debugfs_root
) {
71 printk(KERN_DEBUG
"Cannot create Statistics directory\n");
75 /* Allocate memory to structure */
76 fc_trc_flag
= (struct fc_trace_flag_type
*)
77 vmalloc(sizeof(struct fc_trace_flag_type
));
80 fc_trc_flag
->fc_row_file
= 0;
81 fc_trc_flag
->fc_normal_file
= 1;
82 fc_trc_flag
->fnic_trace
= 2;
83 fc_trc_flag
->fc_trace
= 3;
84 fc_trc_flag
->fc_clear
= 4;
92 * fnic_debugfs_terminate - Tear down debugfs infrastructure
95 * When Debugfs is configured this routine removes debugfs file system
96 * elements that are specific to fnic.
98 void fnic_debugfs_terminate(void)
100 debugfs_remove(fnic_stats_debugfs_root
);
101 fnic_stats_debugfs_root
= NULL
;
103 debugfs_remove(fnic_trace_debugfs_root
);
104 fnic_trace_debugfs_root
= NULL
;
111 * fnic_trace_ctrl_open - Open the trace_enable file for fnic_trace
112 * Or Open fc_trace_enable file for fc_trace
113 * @inode: The inode pointer.
114 * @file: The file pointer to attach the trace enable/disable flag.
117 * This routine opens a debugsfs file trace_enable or fc_trace_enable.
120 * This function returns zero if successful.
122 static int fnic_trace_ctrl_open(struct inode
*inode
, struct file
*filp
)
124 filp
->private_data
= inode
->i_private
;
129 * fnic_trace_ctrl_read -
130 * Read trace_enable ,fc_trace_enable
131 * or fc_trace_clear debugfs file
132 * @filp: The file pointer to read from.
133 * @ubuf: The buffer to copy the data to.
134 * @cnt: The number of bytes to read.
135 * @ppos: The position in the file to start reading from.
138 * This routine reads value of variable fnic_tracing_enabled or
139 * fnic_fc_tracing_enabled or fnic_fc_trace_cleared
140 * and stores into local @buf.
141 * It will start reading file at @ppos and
142 * copy up to @cnt of data to @ubuf from @buf.
145 * This function returns the amount of data that was read.
147 static ssize_t
fnic_trace_ctrl_read(struct file
*filp
,
149 size_t cnt
, loff_t
*ppos
)
155 trace_type
= (u8
*)filp
->private_data
;
156 if (*trace_type
== fc_trc_flag
->fnic_trace
)
157 len
= sprintf(buf
, "%u\n", fnic_tracing_enabled
);
158 else if (*trace_type
== fc_trc_flag
->fc_trace
)
159 len
= sprintf(buf
, "%u\n", fnic_fc_tracing_enabled
);
160 else if (*trace_type
== fc_trc_flag
->fc_clear
)
161 len
= sprintf(buf
, "%u\n", fnic_fc_trace_cleared
);
163 pr_err("fnic: Cannot read to any debugfs file\n");
165 return simple_read_from_buffer(ubuf
, cnt
, ppos
, buf
, len
);
169 * fnic_trace_ctrl_write -
170 * Write to trace_enable, fc_trace_enable or
171 * fc_trace_clear debugfs file
172 * @filp: The file pointer to write from.
173 * @ubuf: The buffer to copy the data from.
174 * @cnt: The number of bytes to write.
175 * @ppos: The position in the file to start writing to.
178 * This routine writes data from user buffer @ubuf to buffer @buf and
179 * sets fc_trace_enable ,tracing_enable or fnic_fc_trace_cleared
180 * value as per user input.
183 * This function returns the amount of data that was written.
185 static ssize_t
fnic_trace_ctrl_write(struct file
*filp
,
186 const char __user
*ubuf
,
187 size_t cnt
, loff_t
*ppos
)
193 trace_type
= (u8
*)filp
->private_data
;
195 if (cnt
>= sizeof(buf
))
198 if (copy_from_user(&buf
, ubuf
, cnt
))
203 ret
= kstrtoul(buf
, 10, &val
);
207 if (*trace_type
== fc_trc_flag
->fnic_trace
)
208 fnic_tracing_enabled
= val
;
209 else if (*trace_type
== fc_trc_flag
->fc_trace
)
210 fnic_fc_tracing_enabled
= val
;
211 else if (*trace_type
== fc_trc_flag
->fc_clear
)
212 fnic_fc_trace_cleared
= val
;
214 pr_err("fnic: cannot write to any debugfs file\n");
221 static const struct file_operations fnic_trace_ctrl_fops
= {
222 .owner
= THIS_MODULE
,
223 .open
= fnic_trace_ctrl_open
,
224 .read
= fnic_trace_ctrl_read
,
225 .write
= fnic_trace_ctrl_write
,
229 * fnic_trace_debugfs_open - Open the fnic trace log
230 * @inode: The inode pointer
231 * @file: The file pointer to attach the log output
234 * This routine is the entry point for the debugfs open file operation.
235 * It allocates the necessary buffer for the log, fills the buffer from
236 * the in-memory log and then returns a pointer to that log in
237 * the private_data field in @file.
240 * This function returns zero if successful. On error it will return
241 * a negative error value.
243 static int fnic_trace_debugfs_open(struct inode
*inode
,
246 fnic_dbgfs_t
*fnic_dbg_prt
;
248 rdata_ptr
= (u8
*)inode
->i_private
;
249 fnic_dbg_prt
= kzalloc(sizeof(fnic_dbgfs_t
), GFP_KERNEL
);
253 if (*rdata_ptr
== fc_trc_flag
->fnic_trace
) {
254 fnic_dbg_prt
->buffer
= vmalloc(3 *
255 (trace_max_pages
* PAGE_SIZE
));
256 if (!fnic_dbg_prt
->buffer
) {
260 memset((void *)fnic_dbg_prt
->buffer
, 0,
261 3 * (trace_max_pages
* PAGE_SIZE
));
262 fnic_dbg_prt
->buffer_len
= fnic_get_trace_data(fnic_dbg_prt
);
264 fnic_dbg_prt
->buffer
=
265 vmalloc(3 * (fnic_fc_trace_max_pages
* PAGE_SIZE
));
266 if (!fnic_dbg_prt
->buffer
) {
270 memset((void *)fnic_dbg_prt
->buffer
, 0,
271 3 * (fnic_fc_trace_max_pages
* PAGE_SIZE
));
272 fnic_dbg_prt
->buffer_len
=
273 fnic_fc_trace_get_data(fnic_dbg_prt
, *rdata_ptr
);
275 file
->private_data
= fnic_dbg_prt
;
281 * fnic_trace_debugfs_lseek - Seek through a debugfs file
282 * @file: The file pointer to seek through.
283 * @offset: The offset to seek to or the amount to seek by.
284 * @howto: Indicates how to seek.
287 * This routine is the entry point for the debugfs lseek file operation.
288 * The @howto parameter indicates whether @offset is the offset to directly
289 * seek to, or if it is a value to seek forward or reverse by. This function
290 * figures out what the new offset of the debugfs file will be and assigns
291 * that value to the f_pos field of @file.
294 * This function returns the new offset if successful and returns a negative
295 * error if unable to process the seek.
297 static loff_t
fnic_trace_debugfs_lseek(struct file
*file
,
301 fnic_dbgfs_t
*fnic_dbg_prt
= file
->private_data
;
302 return fixed_size_llseek(file
, offset
, howto
,
303 fnic_dbg_prt
->buffer_len
);
307 * fnic_trace_debugfs_read - Read a debugfs file
308 * @file: The file pointer to read from.
309 * @ubuf: The buffer to copy the data to.
310 * @nbytes: The number of bytes to read.
311 * @pos: The position in the file to start reading from.
314 * This routine reads data from the buffer indicated in the private_data
315 * field of @file. It will start reading at @pos and copy up to @nbytes of
319 * This function returns the amount of data that was read (this could be
320 * less than @nbytes if the end of the file was reached).
322 static ssize_t
fnic_trace_debugfs_read(struct file
*file
,
327 fnic_dbgfs_t
*fnic_dbg_prt
= file
->private_data
;
329 rc
= simple_read_from_buffer(ubuf
, nbytes
, pos
,
330 fnic_dbg_prt
->buffer
,
331 fnic_dbg_prt
->buffer_len
);
336 * fnic_trace_debugfs_release - Release the buffer used to store
338 * @inode: The inode pointer
339 * @file: The file pointer that contains the buffer to release
342 * This routine frees the buffer that was allocated when the debugfs
346 * This function returns zero.
348 static int fnic_trace_debugfs_release(struct inode
*inode
,
351 fnic_dbgfs_t
*fnic_dbg_prt
= file
->private_data
;
353 vfree(fnic_dbg_prt
->buffer
);
358 static const struct file_operations fnic_trace_debugfs_fops
= {
359 .owner
= THIS_MODULE
,
360 .open
= fnic_trace_debugfs_open
,
361 .llseek
= fnic_trace_debugfs_lseek
,
362 .read
= fnic_trace_debugfs_read
,
363 .release
= fnic_trace_debugfs_release
,
367 * fnic_trace_debugfs_init - Initialize debugfs for fnic trace logging
370 * When Debugfs is configured this routine sets up the fnic debugfs
371 * file system. If not already created, this routine will create the
372 * create file trace to log fnic trace buffer output into debugfs and
373 * it will also create file trace_enable to control enable/disable of
374 * trace logging into trace buffer.
376 int fnic_trace_debugfs_init(void)
379 if (!fnic_trace_debugfs_root
) {
381 "FNIC Debugfs root directory doesn't exist\n");
384 fnic_trace_enable
= debugfs_create_file("tracing_enable",
385 S_IFREG
|S_IRUGO
|S_IWUSR
,
386 fnic_trace_debugfs_root
,
387 &(fc_trc_flag
->fnic_trace
),
388 &fnic_trace_ctrl_fops
);
390 if (!fnic_trace_enable
) {
392 "Cannot create trace_enable file under debugfs\n");
396 fnic_trace_debugfs_file
= debugfs_create_file("trace",
397 S_IFREG
|S_IRUGO
|S_IWUSR
,
398 fnic_trace_debugfs_root
,
399 &(fc_trc_flag
->fnic_trace
),
400 &fnic_trace_debugfs_fops
);
402 if (!fnic_trace_debugfs_file
) {
404 "Cannot create trace file under debugfs\n");
412 * fnic_trace_debugfs_terminate - Tear down debugfs infrastructure
415 * When Debugfs is configured this routine removes debugfs file system
416 * elements that are specific to fnic trace logging.
418 void fnic_trace_debugfs_terminate(void)
420 debugfs_remove(fnic_trace_debugfs_file
);
421 fnic_trace_debugfs_file
= NULL
;
423 debugfs_remove(fnic_trace_enable
);
424 fnic_trace_enable
= NULL
;
428 * fnic_fc_trace_debugfs_init -
429 * Initialize debugfs for fnic control frame trace logging
432 * When Debugfs is configured this routine sets up the fnic_fc debugfs
433 * file system. If not already created, this routine will create the
434 * create file trace to log fnic fc trace buffer output into debugfs and
435 * it will also create file fc_trace_enable to control enable/disable of
436 * trace logging into trace buffer.
439 int fnic_fc_trace_debugfs_init(void)
443 if (!fnic_trace_debugfs_root
) {
444 pr_err("fnic:Debugfs root directory doesn't exist\n");
448 fnic_fc_trace_enable
= debugfs_create_file("fc_trace_enable",
449 S_IFREG
|S_IRUGO
|S_IWUSR
,
450 fnic_trace_debugfs_root
,
451 &(fc_trc_flag
->fc_trace
),
452 &fnic_trace_ctrl_fops
);
454 if (!fnic_fc_trace_enable
) {
455 pr_err("fnic: Failed create fc_trace_enable file\n");
459 fnic_fc_trace_clear
= debugfs_create_file("fc_trace_clear",
460 S_IFREG
|S_IRUGO
|S_IWUSR
,
461 fnic_trace_debugfs_root
,
462 &(fc_trc_flag
->fc_clear
),
463 &fnic_trace_ctrl_fops
);
465 if (!fnic_fc_trace_clear
) {
466 pr_err("fnic: Failed to create fc_trace_enable file\n");
470 fnic_fc_rdata_trace_debugfs_file
=
471 debugfs_create_file("fc_trace_rdata",
472 S_IFREG
|S_IRUGO
|S_IWUSR
,
473 fnic_trace_debugfs_root
,
474 &(fc_trc_flag
->fc_normal_file
),
475 &fnic_trace_debugfs_fops
);
477 if (!fnic_fc_rdata_trace_debugfs_file
) {
478 pr_err("fnic: Failed create fc_rdata_trace file\n");
482 fnic_fc_trace_debugfs_file
=
483 debugfs_create_file("fc_trace",
484 S_IFREG
|S_IRUGO
|S_IWUSR
,
485 fnic_trace_debugfs_root
,
486 &(fc_trc_flag
->fc_row_file
),
487 &fnic_trace_debugfs_fops
);
489 if (!fnic_fc_trace_debugfs_file
) {
490 pr_err("fnic: Failed to create fc_trace file\n");
498 * fnic_fc_trace_debugfs_terminate - Tear down debugfs infrastructure
501 * When Debugfs is configured this routine removes debugfs file system
502 * elements that are specific to fnic_fc trace logging.
505 void fnic_fc_trace_debugfs_terminate(void)
507 debugfs_remove(fnic_fc_trace_debugfs_file
);
508 fnic_fc_trace_debugfs_file
= NULL
;
510 debugfs_remove(fnic_fc_rdata_trace_debugfs_file
);
511 fnic_fc_rdata_trace_debugfs_file
= NULL
;
513 debugfs_remove(fnic_fc_trace_enable
);
514 fnic_fc_trace_enable
= NULL
;
516 debugfs_remove(fnic_fc_trace_clear
);
517 fnic_fc_trace_clear
= NULL
;
521 * fnic_reset_stats_open - Open the reset_stats file
522 * @inode: The inode pointer.
523 * @file: The file pointer to attach the stats reset flag.
526 * This routine opens a debugsfs file reset_stats and stores i_private data
527 * to debug structure to retrieve later for while performing other
531 * This function returns zero if successful.
533 static int fnic_reset_stats_open(struct inode
*inode
, struct file
*file
)
535 struct stats_debug_info
*debug
;
537 debug
= kzalloc(sizeof(struct stats_debug_info
), GFP_KERNEL
);
541 debug
->i_private
= inode
->i_private
;
543 file
->private_data
= debug
;
549 * fnic_reset_stats_read - Read a reset_stats debugfs file
550 * @filp: The file pointer to read from.
551 * @ubuf: The buffer to copy the data to.
552 * @cnt: The number of bytes to read.
553 * @ppos: The position in the file to start reading from.
556 * This routine reads value of variable reset_stats
557 * and stores into local @buf. It will start reading file at @ppos and
558 * copy up to @cnt of data to @ubuf from @buf.
561 * This function returns the amount of data that was read.
563 static ssize_t
fnic_reset_stats_read(struct file
*file
,
565 size_t cnt
, loff_t
*ppos
)
567 struct stats_debug_info
*debug
= file
->private_data
;
568 struct fnic
*fnic
= (struct fnic
*)debug
->i_private
;
572 len
= sprintf(buf
, "%u\n", fnic
->reset_stats
);
574 return simple_read_from_buffer(ubuf
, cnt
, ppos
, buf
, len
);
578 * fnic_reset_stats_write - Write to reset_stats debugfs file
579 * @filp: The file pointer to write from.
580 * @ubuf: The buffer to copy the data from.
581 * @cnt: The number of bytes to write.
582 * @ppos: The position in the file to start writing to.
585 * This routine writes data from user buffer @ubuf to buffer @buf and
586 * resets cumulative stats of fnic.
589 * This function returns the amount of data that was written.
591 static ssize_t
fnic_reset_stats_write(struct file
*file
,
592 const char __user
*ubuf
,
593 size_t cnt
, loff_t
*ppos
)
595 struct stats_debug_info
*debug
= file
->private_data
;
596 struct fnic
*fnic
= (struct fnic
*)debug
->i_private
;
597 struct fnic_stats
*stats
= &fnic
->fnic_stats
;
598 u64
*io_stats_p
= (u64
*)&stats
->io_stats
;
599 u64
*fw_stats_p
= (u64
*)&stats
->fw_stats
;
604 if (cnt
>= sizeof(buf
))
607 if (copy_from_user(&buf
, ubuf
, cnt
))
612 ret
= kstrtoul(buf
, 10, &val
);
616 fnic
->reset_stats
= val
;
618 if (fnic
->reset_stats
) {
619 /* Skip variable is used to avoid descrepancies to Num IOs
620 * and IO Completions stats. Skip incrementing No IO Compls
621 * for pending active IOs after reset stats
623 atomic64_set(&fnic
->io_cmpl_skip
,
624 atomic64_read(&stats
->io_stats
.active_ios
));
625 memset(&stats
->abts_stats
, 0, sizeof(struct abort_stats
));
626 memset(&stats
->term_stats
, 0,
627 sizeof(struct terminate_stats
));
628 memset(&stats
->reset_stats
, 0, sizeof(struct reset_stats
));
629 memset(&stats
->misc_stats
, 0, sizeof(struct misc_stats
));
630 memset(&stats
->vlan_stats
, 0, sizeof(struct vlan_stats
));
631 memset(io_stats_p
+1, 0,
632 sizeof(struct io_path_stats
) - sizeof(u64
));
633 memset(fw_stats_p
+1, 0,
634 sizeof(struct fw_stats
) - sizeof(u64
));
635 getnstimeofday(&stats
->stats_timestamps
.last_reset_time
);
643 * fnic_reset_stats_release - Release the buffer used to store
645 * @inode: The inode pointer
646 * @file: The file pointer that contains the buffer to release
649 * This routine frees the buffer that was allocated when the debugfs
653 * This function returns zero.
655 static int fnic_reset_stats_release(struct inode
*inode
,
658 struct stats_debug_info
*debug
= file
->private_data
;
664 * fnic_stats_debugfs_open - Open the stats file for specific host
665 * and get fnic stats.
666 * @inode: The inode pointer.
667 * @file: The file pointer to attach the specific host statistics.
670 * This routine opens a debugsfs file stats of specific host and print
674 * This function returns zero if successful.
676 static int fnic_stats_debugfs_open(struct inode
*inode
,
679 struct fnic
*fnic
= inode
->i_private
;
680 struct fnic_stats
*fnic_stats
= &fnic
->fnic_stats
;
681 struct stats_debug_info
*debug
;
682 int buf_size
= 2 * PAGE_SIZE
;
684 debug
= kzalloc(sizeof(struct stats_debug_info
), GFP_KERNEL
);
688 debug
->debug_buffer
= vmalloc(buf_size
);
689 if (!debug
->debug_buffer
) {
694 debug
->buf_size
= buf_size
;
695 memset((void *)debug
->debug_buffer
, 0, buf_size
);
696 debug
->buffer_len
= fnic_get_stats_data(debug
, fnic_stats
);
698 file
->private_data
= debug
;
704 * fnic_stats_debugfs_read - Read a debugfs file
705 * @file: The file pointer to read from.
706 * @ubuf: The buffer to copy the data to.
707 * @nbytes: The number of bytes to read.
708 * @pos: The position in the file to start reading from.
711 * This routine reads data from the buffer indicated in the private_data
712 * field of @file. It will start reading at @pos and copy up to @nbytes of
716 * This function returns the amount of data that was read (this could be
717 * less than @nbytes if the end of the file was reached).
719 static ssize_t
fnic_stats_debugfs_read(struct file
*file
,
724 struct stats_debug_info
*debug
= file
->private_data
;
726 rc
= simple_read_from_buffer(ubuf
, nbytes
, pos
,
733 * fnic_stats_stats_release - Release the buffer used to store
735 * @inode: The inode pointer
736 * @file: The file pointer that contains the buffer to release
739 * This routine frees the buffer that was allocated when the debugfs
743 * This function returns zero.
745 static int fnic_stats_debugfs_release(struct inode
*inode
,
748 struct stats_debug_info
*debug
= file
->private_data
;
749 vfree(debug
->debug_buffer
);
754 static const struct file_operations fnic_stats_debugfs_fops
= {
755 .owner
= THIS_MODULE
,
756 .open
= fnic_stats_debugfs_open
,
757 .read
= fnic_stats_debugfs_read
,
758 .release
= fnic_stats_debugfs_release
,
761 static const struct file_operations fnic_reset_debugfs_fops
= {
762 .owner
= THIS_MODULE
,
763 .open
= fnic_reset_stats_open
,
764 .read
= fnic_reset_stats_read
,
765 .write
= fnic_reset_stats_write
,
766 .release
= fnic_reset_stats_release
,
770 * fnic_stats_init - Initialize stats struct and create stats file per fnic
773 * When Debugfs is configured this routine sets up the stats file per fnic
774 * It will create file stats and reset_stats under statistics/host# directory
775 * to log per fnic stats.
777 int fnic_stats_debugfs_init(struct fnic
*fnic
)
782 snprintf(name
, sizeof(name
), "host%d", fnic
->lport
->host
->host_no
);
784 if (!fnic_stats_debugfs_root
) {
785 printk(KERN_DEBUG
"fnic_stats root doesn't exist\n");
788 fnic
->fnic_stats_debugfs_host
= debugfs_create_dir(name
,
789 fnic_stats_debugfs_root
);
790 if (!fnic
->fnic_stats_debugfs_host
) {
791 printk(KERN_DEBUG
"Cannot create host directory\n");
795 fnic
->fnic_stats_debugfs_file
= debugfs_create_file("stats",
796 S_IFREG
|S_IRUGO
|S_IWUSR
,
797 fnic
->fnic_stats_debugfs_host
,
799 &fnic_stats_debugfs_fops
);
800 if (!fnic
->fnic_stats_debugfs_file
) {
801 printk(KERN_DEBUG
"Cannot create host stats file\n");
805 fnic
->fnic_reset_debugfs_file
= debugfs_create_file("reset_stats",
806 S_IFREG
|S_IRUGO
|S_IWUSR
,
807 fnic
->fnic_stats_debugfs_host
,
809 &fnic_reset_debugfs_fops
);
810 if (!fnic
->fnic_reset_debugfs_file
) {
811 printk(KERN_DEBUG
"Cannot create host stats file\n");
819 * fnic_stats_debugfs_remove - Tear down debugfs infrastructure of stats
822 * When Debugfs is configured this routine removes debugfs file system
823 * elements that are specific to fnic stats.
825 void fnic_stats_debugfs_remove(struct fnic
*fnic
)
830 debugfs_remove(fnic
->fnic_stats_debugfs_file
);
831 fnic
->fnic_stats_debugfs_file
= NULL
;
833 debugfs_remove(fnic
->fnic_reset_debugfs_file
);
834 fnic
->fnic_reset_debugfs_file
= NULL
;
836 debugfs_remove(fnic
->fnic_stats_debugfs_host
);
837 fnic
->fnic_stats_debugfs_host
= NULL
;