drivers/scsi/isci/host.c
Source file repositories/reference/linux-study-clean/drivers/scsi/isci/host.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/isci/host.c- Extension
.c- Size
- 83186 bytes
- Lines
- 2808
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/circ_buf.hlinux/device.hscsi/sas.hhost.hisci.hport.hprobe_roms.hremote_device.hrequest.hscu_completion_codes.hscu_event_codes.hregisters.hscu_remote_node_context.hscu_task_context.h
Detected Declarations
function NORMALIZE_PUT_POINTERfunction sci_change_statefunction sci_controller_completion_queue_has_entriesfunction sci_controller_isrfunction isci_msix_isrfunction sci_controller_error_isrfunction sci_controller_task_completionfunction sci_controller_sdma_completionfunction sci_controller_unsolicited_framefunction sci_controller_process_completionsfunction sci_controller_error_handlerfunction isci_intx_isrfunction isci_error_isrfunction isci_host_start_completefunction isci_host_scan_finishedfunction sci_controller_get_suggested_start_timeoutfunction sci_controller_enable_interruptsfunction sci_controller_disable_interruptsfunction sci_controller_enable_port_task_schedulerfunction sci_controller_assign_task_entriesfunction sci_controller_initialize_completion_queuefunction sci_controller_initialize_unsolicited_frame_queuefunction sci_controller_transition_to_readyfunction is_phy_startingfunction is_controller_start_completefunction sci_controller_start_next_phyfunction phy_startup_timeoutfunction isci_tci_activefunction sci_controller_startfunction isci_host_startfunction isci_host_stop_completefunction sci_controller_completion_handlerfunction ireq_donefunction isci_host_completion_routinefunction sci_controller_stopfunction sci_controller_resetfunction sci_controller_stop_physfunction removalfunction sci_controller_initial_state_enterfunction sci_controller_starting_state_exitfunction sci_controller_set_interrupt_coalescencefunction sci_controller_ready_state_enterfunction sci_controller_ready_state_exitfunction sci_controller_stop_portsfunction sci_controller_stop_devicesfunction sci_controller_stopping_state_enterfunction sci_controller_stopping_state_exitfunction sci_controller_reset_hardware
Annotated Snippet
if (index == SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX) {
/*
* This is a signature fis or a frame from a direct attached SATA
* device that has not yet been created. In either case forwared
* the frame to the PE and let it take care of the frame data. */
index = SCU_GET_PROTOCOL_ENGINE_INDEX(ent);
iphy = &ihost->phys[index];
result = sci_phy_frame_handler(iphy, frame_index);
} else {
if (index < ihost->remote_node_entries)
idev = ihost->device_table[index];
else
idev = NULL;
if (idev != NULL)
result = sci_remote_device_frame_handler(idev, frame_index);
else
sci_controller_release_frame(ihost, frame_index);
}
}
if (result != SCI_SUCCESS) {
/*
* / @todo Is there any reason to report some additional error message
* / when we get this failure notifiction? */
}
}
static void sci_controller_event_completion(struct isci_host *ihost, u32 ent)
{
struct isci_remote_device *idev;
struct isci_request *ireq;
struct isci_phy *iphy;
u32 index;
index = SCU_GET_COMPLETION_INDEX(ent);
switch (scu_get_event_type(ent)) {
case SCU_EVENT_TYPE_SMU_COMMAND_ERROR:
/* / @todo The driver did something wrong and we need to fix the condtion. */
dev_err(&ihost->pdev->dev,
"%s: SCIC Controller 0x%p received SMU command error "
"0x%x\n",
__func__,
ihost,
ent);
break;
case SCU_EVENT_TYPE_SMU_PCQ_ERROR:
case SCU_EVENT_TYPE_SMU_ERROR:
case SCU_EVENT_TYPE_FATAL_MEMORY_ERROR:
/*
* / @todo This is a hardware failure and its likely that we want to
* / reset the controller. */
dev_err(&ihost->pdev->dev,
"%s: SCIC Controller 0x%p received fatal controller "
"event 0x%x\n",
__func__,
ihost,
ent);
break;
case SCU_EVENT_TYPE_TRANSPORT_ERROR:
ireq = ihost->reqs[index];
sci_io_request_event_handler(ireq, ent);
break;
case SCU_EVENT_TYPE_PTX_SCHEDULE_EVENT:
switch (scu_get_event_specifier(ent)) {
case SCU_EVENT_SPECIFIC_SMP_RESPONSE_NO_PE:
case SCU_EVENT_SPECIFIC_TASK_TIMEOUT:
ireq = ihost->reqs[index];
if (ireq != NULL)
sci_io_request_event_handler(ireq, ent);
else
dev_warn(&ihost->pdev->dev,
"%s: SCIC Controller 0x%p received "
"event 0x%x for io request object "
"that doesn't exist.\n",
__func__,
ihost,
ent);
break;
case SCU_EVENT_SPECIFIC_IT_NEXUS_TIMEOUT:
idev = ihost->device_table[index];
if (idev != NULL)
sci_remote_device_event_handler(idev, ent);
else
Annotation
- Immediate include surface: `linux/circ_buf.h`, `linux/device.h`, `scsi/sas.h`, `host.h`, `isci.h`, `port.h`, `probe_roms.h`, `remote_device.h`.
- Detected declarations: `function NORMALIZE_PUT_POINTER`, `function sci_change_state`, `function sci_controller_completion_queue_has_entries`, `function sci_controller_isr`, `function isci_msix_isr`, `function sci_controller_error_isr`, `function sci_controller_task_completion`, `function sci_controller_sdma_completion`, `function sci_controller_unsolicited_frame`, `function sci_controller_process_completions`.
- 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.