drivers/scsi/bfa/bfa_ioc_ct.c
Source file repositories/reference/linux-study-clean/drivers/scsi/bfa/bfa_ioc_ct.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/bfa/bfa_ioc_ct.c- Extension
.c- Size
- 27277 bytes
- Lines
- 991
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
bfad_drv.hbfa_ioc.hbfi_reg.hbfa_defs.h
Detected Declarations
function bfa_ioc_ct_firmware_lockfunction bfa_ioc_ct_firmware_unlockfunction bfa_ioc_ct_notify_failfunction bfa_ioc_ct_reg_initfunction bfa_ioc_ct2_reg_initfunction bfa_ioc_ct_map_portfunction bfa_ioc_ct2_map_portfunction bfa_ioc_ct_isr_mode_setfunction bfa_ioc_ct2_lpu_read_statfunction bfa_ioc_ct_ownership_resetfunction bfa_ioc_ct_sync_startfunction bfa_ioc_ct_sync_joinfunction bfa_ioc_ct_sync_leavefunction bfa_ioc_ct_sync_ackfunction bfa_ioc_ct_sync_completefunction bfa_ioc_attachfunction bfa_ioc_attachfunction bfa_ioc_attachfunction bfa_ioc_ct2_poweronfunction bfa_ioc_ct_pll_initfunction bfa_ioc_ct2_sclk_initfunction bfa_ioc_ct2_lclk_initfunction bfa_ioc_ct2_mem_initfunction bfa_ioc_ct2_mac_resetfunction bfa_ioc_ct2_enable_flashfunction bfa_ioc_ct2_nfc_haltedfunction bfa_ioc_ct2_nfc_haltfunction bfa_ioc_ct2_nfc_resumefunction bfa_ioc_ct2_clk_resetfunction bfa_ioc_ct2_nfc_clk_resetfunction bfa_ioc_ct2_wait_till_nfc_runningfunction bfa_ioc_ct2_pll_initfunction bfa_ioc_ct_set_cur_ioc_fwstatefunction bfa_ioc_ct_get_cur_ioc_fwstatefunction bfa_ioc_ct_set_alt_ioc_fwstatefunction bfa_ioc_ct_get_alt_ioc_fwstate
Annotated Snippet
if (r32 == 1) {
writel(1, (rb + CT2_LPU0_HOSTFN_CMD_STAT));
readl((rb + CT2_LPU0_HOSTFN_CMD_STAT));
}
r32 = readl((rb + CT2_LPU1_HOSTFN_CMD_STAT));
if (r32 == 1) {
writel(1, (rb + CT2_LPU1_HOSTFN_CMD_STAT));
readl((rb + CT2_LPU1_HOSTFN_CMD_STAT));
}
}
bfa_ioc_ct2_mem_init(rb);
writel(BFI_IOC_UNINIT, (rb + CT2_BFA_IOC0_STATE_REG));
writel(BFI_IOC_UNINIT, (rb + CT2_BFA_IOC1_STATE_REG));
return BFA_STATUS_OK;
}
static void
bfa_ioc_ct_set_cur_ioc_fwstate(struct bfa_ioc_s *ioc,
enum bfi_ioc_state fwstate)
{
writel(fwstate, ioc->ioc_regs.ioc_fwstate);
}
static enum bfi_ioc_state
bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc)
{
return (enum bfi_ioc_state)readl(ioc->ioc_regs.ioc_fwstate);
}
static void
bfa_ioc_ct_set_alt_ioc_fwstate(struct bfa_ioc_s *ioc,
enum bfi_ioc_state fwstate)
{
writel(fwstate, ioc->ioc_regs.alt_ioc_fwstate);
}
static enum bfi_ioc_state
bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc)
{
return (enum bfi_ioc_state) readl(ioc->ioc_regs.alt_ioc_fwstate);
}
Annotation
- Immediate include surface: `bfad_drv.h`, `bfa_ioc.h`, `bfi_reg.h`, `bfa_defs.h`.
- Detected declarations: `function bfa_ioc_ct_firmware_lock`, `function bfa_ioc_ct_firmware_unlock`, `function bfa_ioc_ct_notify_fail`, `function bfa_ioc_ct_reg_init`, `function bfa_ioc_ct2_reg_init`, `function bfa_ioc_ct_map_port`, `function bfa_ioc_ct2_map_port`, `function bfa_ioc_ct_isr_mode_set`, `function bfa_ioc_ct2_lpu_read_stat`, `function bfa_ioc_ct_ownership_reset`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
- 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.