drivers/scsi/aic94xx/aic94xx_sds.c
Source file repositories/reference/linux-study-clean/drivers/scsi/aic94xx/aic94xx_sds.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/aic94xx/aic94xx_sds.c- Extension
.c- Size
- 36644 bytes
- Lines
- 1463
- 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.
- 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/pci.hlinux/slab.hlinux/delay.haic94xx.haic94xx_reg.haic94xx_sds.h
Detected Declarations
struct asd_ocm_dir_entstruct asd_ocm_dirstruct asd_bios_chim_structstruct asd_flash_destruct asd_flash_dirstruct asd_manuf_secstruct asd_manuf_phy_descstruct asd_manuf_phy_paramstruct asd_ms_sb_descstruct asd_ms_conn_descstruct asd_nd_phy_descstruct asd_ms_node_descstruct asd_ms_conn_mapstruct asd_ctrla_phy_entrystruct asd_ctrla_phy_settingsstruct asd_ll_elfunction asd_read_ocm_segfunction asd_read_ocm_dirfunction asd_write_ocm_segfunction asd_find_dir_entryfunction asd_get_bios_chimfunction asd_hwi_initialize_ocm_dirfunction asd_hwi_check_ocm_accessfunction asd_read_ocmfunction asd_poll_flashfunction asd_reset_flashfunction asd_read_flash_segfunction asd_find_flash_dirfunction asd_flash_getidfunction asd_calc_flash_chksumfunction asd_find_flash_defunction asd_validate_msfunction asd_ms_get_sas_addrfunction asd_ms_get_pcba_snfunction enabledfunction asd_ms_get_connector_mapfunction asd_process_msfunction asd_process_ctrla_phy_settingsfunction asd_process_ctrl_a_userfunction asd_read_flashfunction asd_verify_flash_segfunction asd_write_flash_segfunction asd_chk_write_statusfunction asd_erase_nv_sectorfunction asd_check_flash_type
Annotated Snippet
struct asd_ocm_dir_ent {
u8 type;
u8 offs[3];
u8 _r1;
u8 size[3];
} __attribute__ ((packed));
struct asd_ocm_dir {
char sig[2];
u8 _r1[2];
u8 major; /* 0 */
u8 minor; /* 0 */
u8 _r2;
u8 num_de;
struct asd_ocm_dir_ent entry[15];
} __attribute__ ((packed));
#define OCM_DE_OCM_DIR 0x00
#define OCM_DE_WIN_DRVR 0x01
#define OCM_DE_BIOS_CHIM 0x02
#define OCM_DE_RAID_ENGN 0x03
#define OCM_DE_BIOS_INTL 0x04
#define OCM_DE_BIOS_CHIM_OSM 0x05
#define OCM_DE_BIOS_CHIM_DYNAMIC 0x06
#define OCM_DE_ADDC2C_RES0 0x07
#define OCM_DE_ADDC2C_RES1 0x08
#define OCM_DE_ADDC2C_RES2 0x09
#define OCM_DE_ADDC2C_RES3 0x0A
#define OCM_INIT_DIR_ENTRIES 5
/***************************************************************************
* OCM directory default
***************************************************************************/
static struct asd_ocm_dir OCMDirInit =
{
.sig = {0x4D, 0x4F}, /* signature */
.num_de = OCM_INIT_DIR_ENTRIES, /* no. of directory entries */
};
/***************************************************************************
* OCM directory Entries default
***************************************************************************/
static struct asd_ocm_dir_ent OCMDirEntriesInit[OCM_INIT_DIR_ENTRIES] =
{
{
.type = (OCM_DE_ADDC2C_RES0), /* Entry type */
.offs = {128}, /* Offset */
.size = {0, 4}, /* size */
},
{
.type = (OCM_DE_ADDC2C_RES1), /* Entry type */
.offs = {128, 4}, /* Offset */
.size = {0, 4}, /* size */
},
{
.type = (OCM_DE_ADDC2C_RES2), /* Entry type */
.offs = {128, 8}, /* Offset */
.size = {0, 4}, /* size */
},
{
.type = (OCM_DE_ADDC2C_RES3), /* Entry type */
.offs = {128, 12}, /* Offset */
.size = {0, 4}, /* size */
},
{
.type = (OCM_DE_WIN_DRVR), /* Entry type */
.offs = {128, 16}, /* Offset */
.size = {128, 235, 1}, /* size */
},
};
struct asd_bios_chim_struct {
char sig[4];
u8 major; /* 1 */
u8 minor; /* 0 */
u8 bios_major;
u8 bios_minor;
__le32 bios_build;
u8 flags;
u8 pci_slot;
__le16 ue_num;
__le16 ue_size;
u8 _r[14];
/* The unit element array is right here.
*/
} __attribute__ ((packed));
/**
* asd_read_ocm_seg - read an on chip memory (OCM) segment
* @asd_ha: pointer to the host adapter structure
Annotation
- Immediate include surface: `linux/pci.h`, `linux/slab.h`, `linux/delay.h`, `aic94xx.h`, `aic94xx_reg.h`, `aic94xx_sds.h`.
- Detected declarations: `struct asd_ocm_dir_ent`, `struct asd_ocm_dir`, `struct asd_bios_chim_struct`, `struct asd_flash_de`, `struct asd_flash_dir`, `struct asd_manuf_sec`, `struct asd_manuf_phy_desc`, `struct asd_manuf_phy_param`, `struct asd_ms_sb_desc`, `struct asd_ms_conn_desc`.
- 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.