drivers/net/ethernet/intel/ice/ice_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/ice/ice_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/ice/ice_debugfs.c- Extension
.c- Size
- 1014 bytes
- Lines
- 48
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/debugfs.hice.h
Detected Declarations
function ice_debugfs_pf_initfunction ice_debugfs_pf_deinitfunction ice_debugfs_initfunction ice_debugfs_exit
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2022, Intel Corporation. */
#include <linux/debugfs.h>
#include "ice.h"
static struct dentry *ice_debugfs_root;
int ice_debugfs_pf_init(struct ice_pf *pf)
{
const char *name = pci_name(pf->pdev);
pf->ice_debugfs_pf = debugfs_create_dir(name, ice_debugfs_root);
if (IS_ERR(pf->ice_debugfs_pf))
return PTR_ERR(pf->ice_debugfs_pf);
return 0;
}
/**
* ice_debugfs_pf_deinit - cleanup PF's debugfs
* @pf: pointer to the PF struct
*/
void ice_debugfs_pf_deinit(struct ice_pf *pf)
{
debugfs_remove_recursive(pf->ice_debugfs_pf);
pf->ice_debugfs_pf = NULL;
}
/**
* ice_debugfs_init - create root directory for debugfs entries
*/
void ice_debugfs_init(void)
{
ice_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL);
if (IS_ERR(ice_debugfs_root))
pr_info("init of debugfs failed\n");
}
/**
* ice_debugfs_exit - remove debugfs entries
*/
void ice_debugfs_exit(void)
{
debugfs_remove_recursive(ice_debugfs_root);
ice_debugfs_root = NULL;
}
Annotation
- Immediate include surface: `linux/debugfs.h`, `ice.h`.
- Detected declarations: `function ice_debugfs_pf_init`, `function ice_debugfs_pf_deinit`, `function ice_debugfs_init`, `function ice_debugfs_exit`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.