drivers/scsi/scsi_sysctl.c
Source file repositories/reference/linux-study-clean/drivers/scsi/scsi_sysctl.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/scsi_sysctl.c- Extension
.c- Size
- 800 bytes
- Lines
- 39
- Domain
- Driver Families
- Bucket
- drivers/scsi
- 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/errno.hlinux/init.hlinux/kernel.hlinux/sysctl.hscsi_logging.hscsi_priv.h
Detected Declarations
function scsi_init_sysctlfunction scsi_exit_sysctl
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2003 Christoph Hellwig.
*/
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sysctl.h>
#include "scsi_logging.h"
#include "scsi_priv.h"
static const struct ctl_table scsi_table[] = {
{ .procname = "logging_level",
.data = &scsi_logging_level,
.maxlen = sizeof(scsi_logging_level),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_INT_MAX },
};
static struct ctl_table_header *scsi_table_header;
int __init scsi_init_sysctl(void)
{
scsi_table_header = register_sysctl("dev/scsi", scsi_table);
if (!scsi_table_header)
return -ENOMEM;
return 0;
}
void scsi_exit_sysctl(void)
{
unregister_sysctl_table(scsi_table_header);
}
Annotation
- Immediate include surface: `linux/errno.h`, `linux/init.h`, `linux/kernel.h`, `linux/sysctl.h`, `scsi_logging.h`, `scsi_priv.h`.
- Detected declarations: `function scsi_init_sysctl`, `function scsi_exit_sysctl`.
- Atlas domain: Driver Families / drivers/scsi.
- 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.