drivers/scsi/mpt3sas/mpt3sas_config.c
Source file repositories/reference/linux-study-clean/drivers/scsi/mpt3sas/mpt3sas_config.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/mpt3sas/mpt3sas_config.c- Extension
.c- Size
- 85469 bytes
- Lines
- 2716
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/kernel.hlinux/init.hlinux/errno.hlinux/blkdev.hlinux/sched.hlinux/workqueue.hlinux/delay.hlinux/pci.hmpt3sas_base.h
Detected Declarations
struct config_requestfunction _config_display_some_debugfunction _config_alloc_config_dma_memoryfunction _config_free_config_dma_memoryfunction mpt3sas_config_donefunction _config_requestfunction mpt3sas_config_get_manufacturing_pg0function mpt3sas_config_get_manufacturing_pg1function mpt3sas_config_get_manufacturing_pg10function mpt3sas_config_get_manufacturing_pg11function mpt3sas_config_set_manufacturing_pg11function mpt3sas_config_get_bios_pg2function mpt3sas_config_get_bios_pg3function mpt3sas_config_set_bios_pg4function mpt3sas_config_get_bios_pg4function mpt3sas_config_get_iounit_pg0function mpt3sas_config_get_iounit_pg1function mpt3sas_config_set_iounit_pg1function mpt3sas_config_get_iounit_pg3function mpt3sas_config_get_iounit_pg8function mpt3sas_config_get_ioc_pg8function mpt3sas_config_get_ioc_pg1function mpt3sas_config_set_ioc_pg1function mpt3sas_config_get_sas_device_pg0function mpt3sas_config_get_pcie_device_pg0function mpt3sas_config_get_pcie_iounit_pg1function mpt3sas_config_get_pcie_device_pg2function mpt3sas_config_get_number_hba_physfunction mpt3sas_config_get_sas_iounit_pg0function mpt3sas_config_get_sas_iounit_pg1function mpt3sas_config_set_sas_iounit_pg1function mpt3sas_config_get_expander_pg0function mpt3sas_config_get_expander_pg1function mpt3sas_config_get_enclosure_pg0function mpt3sas_config_get_phy_pg0function mpt3sas_config_get_phy_pg1function mpt3sas_config_get_raid_volume_pg1function mpt3sas_config_get_number_pdsfunction mpt3sas_config_get_raid_volume_pg0function mpt3sas_config_get_phys_disk_pg0function mpt3sas_config_get_driver_trigger_pg0function _config_set_driver_trigger_pg0function mpt3sas_config_update_driver_trigger_pg0function mpt3sas_config_get_driver_trigger_pg1function _config_set_driver_trigger_pg1function mpt3sas_config_update_driver_trigger_pg1function mpt3sas_config_get_driver_trigger_pg2function _config_set_driver_trigger_pg2
Annotated Snippet
struct config_request {
u16 sz;
void *page;
dma_addr_t page_dma;
};
/**
* _config_display_some_debug - debug routine
* @ioc: per adapter object
* @smid: system request message index
* @calling_function_name: string pass from calling function
* @mpi_reply: reply message frame
* Context: none.
*
* Function for displaying debug info helpful when debugging issues
* in this module.
*/
static void
_config_display_some_debug(struct MPT3SAS_ADAPTER *ioc, u16 smid,
char *calling_function_name, MPI2DefaultReply_t *mpi_reply)
{
Mpi2ConfigRequest_t *mpi_request;
char *desc = NULL;
mpi_request = mpt3sas_base_get_msg_frame(ioc, smid);
switch (mpi_request->Header.PageType & MPI2_CONFIG_PAGETYPE_MASK) {
case MPI2_CONFIG_PAGETYPE_IO_UNIT:
desc = "io_unit";
break;
case MPI2_CONFIG_PAGETYPE_IOC:
desc = "ioc";
break;
case MPI2_CONFIG_PAGETYPE_BIOS:
desc = "bios";
break;
case MPI2_CONFIG_PAGETYPE_RAID_VOLUME:
desc = "raid_volume";
break;
case MPI2_CONFIG_PAGETYPE_MANUFACTURING:
desc = "manufacturing";
break;
case MPI2_CONFIG_PAGETYPE_RAID_PHYSDISK:
desc = "physdisk";
break;
case MPI2_CONFIG_PAGETYPE_EXTENDED:
switch (mpi_request->ExtPageType) {
case MPI2_CONFIG_EXTPAGETYPE_SAS_IO_UNIT:
desc = "sas_io_unit";
break;
case MPI2_CONFIG_EXTPAGETYPE_SAS_EXPANDER:
desc = "sas_expander";
break;
case MPI2_CONFIG_EXTPAGETYPE_SAS_DEVICE:
desc = "sas_device";
break;
case MPI2_CONFIG_EXTPAGETYPE_SAS_PHY:
desc = "sas_phy";
break;
case MPI2_CONFIG_EXTPAGETYPE_LOG:
desc = "log";
break;
case MPI2_CONFIG_EXTPAGETYPE_ENCLOSURE:
desc = "enclosure";
break;
case MPI2_CONFIG_EXTPAGETYPE_RAID_CONFIG:
desc = "raid_config";
break;
case MPI2_CONFIG_EXTPAGETYPE_DRIVER_MAPPING:
desc = "driver_mapping";
break;
case MPI2_CONFIG_EXTPAGETYPE_SAS_PORT:
desc = "sas_port";
break;
case MPI2_CONFIG_EXTPAGETYPE_EXT_MANUFACTURING:
desc = "ext_manufacturing";
break;
case MPI2_CONFIG_EXTPAGETYPE_PCIE_IO_UNIT:
desc = "pcie_io_unit";
break;
case MPI2_CONFIG_EXTPAGETYPE_PCIE_SWITCH:
desc = "pcie_switch";
break;
case MPI2_CONFIG_EXTPAGETYPE_PCIE_DEVICE:
desc = "pcie_device";
break;
case MPI2_CONFIG_EXTPAGETYPE_PCIE_LINK:
desc = "pcie_link";
break;
}
break;
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/init.h`, `linux/errno.h`, `linux/blkdev.h`, `linux/sched.h`, `linux/workqueue.h`, `linux/delay.h`.
- Detected declarations: `struct config_request`, `function _config_display_some_debug`, `function _config_alloc_config_dma_memory`, `function _config_free_config_dma_memory`, `function mpt3sas_config_done`, `function _config_request`, `function mpt3sas_config_get_manufacturing_pg0`, `function mpt3sas_config_get_manufacturing_pg1`, `function mpt3sas_config_get_manufacturing_pg10`, `function mpt3sas_config_get_manufacturing_pg11`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.