drivers/s390/scsi/zfcp_fsf.c
Source file repositories/reference/linux-study-clean/drivers/s390/scsi/zfcp_fsf.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/scsi/zfcp_fsf.c- Extension
.c- Size
- 80231 bytes
- Lines
- 2763
- Domain
- Driver Families
- Bucket
- drivers/s390
- 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.
- 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/blktrace_api.hlinux/jiffies.hlinux/types.hlinux/slab.hscsi/fc/fc_els.hzfcp_ext.hzfcp_fc.hzfcp_dbf.hzfcp_qdio.hzfcp_reqlist.hzfcp_diag.h
Detected Declarations
function zfcp_fsf_request_timeout_handlerfunction zfcp_fsf_start_timerfunction zfcp_fsf_start_erp_timerfunction zfcp_fsf_class_not_suppfunction zfcp_fsf_req_freefunction zfcp_fsf_status_read_port_closedfunction zfcp_fsf_fc_host_link_downfunction zfcp_fsf_link_down_info_evalfunction zfcp_fsf_status_read_link_downfunction zfcp_fsf_status_read_version_changefunction zfcp_fsf_status_read_handlerfunction zfcp_fsf_fsfstatus_qual_evalfunction zfcp_fsf_fsfstatus_evalfunction zfcp_fsf_protstatus_evalfunction zfcp_erp_strategy_check_fsfreqfunction BUG_ONfunction list_for_each_entry_safefunction zfcp_fsf_convert_portspeedfunction zfcp_fsf_exchange_config_evaluatefunction zfcp_fsf_exchange_config_data_handlerfunction zfcp_fsf_scnprint_fc_securityfunction zfcp_fsf_dbf_adapter_fc_securityfunction zfcp_fsf_exchange_port_evaluatefunction zfcp_fsf_exchange_port_data_handlerfunction zfcp_fsf_req_sendfunction zfcp_fsf_status_readfunction zfcp_fsf_abort_fcp_command_handlerfunction zfcp_fsf_send_ct_handlerfunction zfcp_fsf_setup_ct_els_unchainedfunction zfcp_fsf_setup_ct_els_sbalsfunction zfcp_fsf_setup_ct_elsfunction zfcp_fsf_send_ctfunction zfcp_fsf_send_els_handlerfunction zfcp_fsf_send_elsfunction zfcp_fsf_exchange_config_datafunction zfcp_fsf_exchange_config_data_syncfunction zfcp_fsf_exchange_port_datafunction zfcp_fsf_exchange_port_data_syncfunction zfcp_fsf_log_port_fc_securityfunction zfcp_fsf_log_security_errorfunction zfcp_fsf_open_port_handlerfunction zfcp_fsf_open_portfunction zfcp_fsf_close_port_handlerfunction zfcp_fsf_close_portfunction zfcp_fsf_open_wka_port_handlerfunction zfcp_fsf_open_wka_portfunction zfcp_fsf_close_wka_port_handlerfunction zfcp_fsf_close_wka_port
Annotated Snippet
if (port->d_id == d_id) {
zfcp_erp_port_reopen(port, 0, "fssrpc1");
break;
}
read_unlock_irqrestore(&adapter->port_list_lock, flags);
}
void zfcp_fsf_fc_host_link_down(struct zfcp_adapter *adapter)
{
struct Scsi_Host *shost = adapter->scsi_host;
adapter->hydra_version = 0;
adapter->peer_wwpn = 0;
adapter->peer_wwnn = 0;
adapter->peer_d_id = 0;
/* if there is no shost yet, we have nothing to zero-out */
if (shost == NULL)
return;
fc_host_port_id(shost) = 0;
fc_host_fabric_name(shost) = 0;
fc_host_speed(shost) = FC_PORTSPEED_UNKNOWN;
fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
snprintf(fc_host_model(shost), FC_SYMBOLIC_NAME_SIZE, "0x%04x", 0);
memset(fc_host_active_fc4s(shost), 0, FC_FC4_LIST_SIZE);
}
static void zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *req,
struct fsf_link_down_info *link_down)
{
struct zfcp_adapter *adapter = req->adapter;
if (atomic_read(&adapter->status) & ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED)
return;
atomic_or(ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED, &adapter->status);
zfcp_scsi_schedule_rports_block(adapter);
zfcp_fsf_fc_host_link_down(adapter);
if (!link_down)
goto out;
switch (link_down->error_code) {
case FSF_PSQ_LINK_NO_LIGHT:
dev_warn(&req->adapter->ccw_device->dev,
"There is no light signal from the local "
"fibre channel cable\n");
break;
case FSF_PSQ_LINK_WRAP_PLUG:
dev_warn(&req->adapter->ccw_device->dev,
"There is a wrap plug instead of a fibre "
"channel cable\n");
break;
case FSF_PSQ_LINK_NO_FCP:
dev_warn(&req->adapter->ccw_device->dev,
"The adjacent fibre channel node does not "
"support FCP\n");
break;
case FSF_PSQ_LINK_FIRMWARE_UPDATE:
dev_warn(&req->adapter->ccw_device->dev,
"The FCP device is suspended because of a "
"firmware update\n");
break;
case FSF_PSQ_LINK_INVALID_WWPN:
dev_warn(&req->adapter->ccw_device->dev,
"The FCP device detected a WWPN that is "
"duplicate or not valid\n");
break;
case FSF_PSQ_LINK_NO_NPIV_SUPPORT:
dev_warn(&req->adapter->ccw_device->dev,
"The fibre channel fabric does not support NPIV\n");
break;
case FSF_PSQ_LINK_NO_FCP_RESOURCES:
dev_warn(&req->adapter->ccw_device->dev,
"The FCP adapter cannot support more NPIV ports\n");
break;
case FSF_PSQ_LINK_NO_FABRIC_RESOURCES:
dev_warn(&req->adapter->ccw_device->dev,
"The adjacent switch cannot support "
"more NPIV ports\n");
break;
case FSF_PSQ_LINK_FABRIC_LOGIN_UNABLE:
dev_warn(&req->adapter->ccw_device->dev,
"The FCP adapter could not log in to the "
"fibre channel fabric\n");
break;
case FSF_PSQ_LINK_WWPN_ASSIGNMENT_CORRUPTED:
Annotation
- Immediate include surface: `linux/blktrace_api.h`, `linux/jiffies.h`, `linux/types.h`, `linux/slab.h`, `scsi/fc/fc_els.h`, `zfcp_ext.h`, `zfcp_fc.h`, `zfcp_dbf.h`.
- Detected declarations: `function zfcp_fsf_request_timeout_handler`, `function zfcp_fsf_start_timer`, `function zfcp_fsf_start_erp_timer`, `function zfcp_fsf_class_not_supp`, `function zfcp_fsf_req_free`, `function zfcp_fsf_status_read_port_closed`, `function zfcp_fsf_fc_host_link_down`, `function zfcp_fsf_link_down_info_eval`, `function zfcp_fsf_status_read_link_down`, `function zfcp_fsf_status_read_version_change`.
- Atlas domain: Driver Families / drivers/s390.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.