drivers/scsi/libfc/fc_elsct.c
Source file repositories/reference/linux-study-clean/drivers/scsi/libfc/fc_elsct.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/libfc/fc_elsct.c- Extension
.c- Size
- 3063 bytes
- Lines
- 141
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hlinux/unaligned.hscsi/fc/fc_gs.hscsi/fc/fc_ns.hscsi/fc/fc_els.hscsi/libfc.hfc_encode.hfc_libfc.h
Detected Declarations
function Copyrightfunction fc_elsct_initfunction fc_els_resp_typeexport fc_elsct_sendexport fc_elsct_init
Annotated Snippet
switch (-PTR_ERR(fp)) {
case FC_NO_ERR:
msg = "response no error";
break;
case FC_EX_TIMEOUT:
msg = "response timeout";
break;
case FC_EX_CLOSED:
msg = "response closed";
break;
default:
msg = "response unknown error";
break;
}
} else {
fh = fc_frame_header_get(fp);
switch (fh->fh_type) {
case FC_TYPE_ELS:
switch (fc_frame_payload_op(fp)) {
case ELS_LS_ACC:
msg = "accept";
break;
case ELS_LS_RJT:
msg = "reject";
break;
default:
msg = "response unknown ELS";
break;
}
break;
case FC_TYPE_CT:
ct = fc_frame_payload_get(fp, sizeof(*ct));
if (ct) {
switch (ntohs(ct->ct_cmd)) {
case FC_FS_ACC:
msg = "CT accept";
break;
case FC_FS_RJT:
msg = "CT reject";
break;
default:
msg = "response unknown CT";
break;
}
} else {
msg = "short CT response";
}
break;
default:
msg = "response not ELS or CT";
break;
}
}
return msg;
}
Annotation
- Immediate include surface: `linux/export.h`, `linux/unaligned.h`, `scsi/fc/fc_gs.h`, `scsi/fc/fc_ns.h`, `scsi/fc/fc_els.h`, `scsi/libfc.h`, `fc_encode.h`, `fc_libfc.h`.
- Detected declarations: `function Copyright`, `function fc_elsct_init`, `function fc_els_resp_type`, `export fc_elsct_send`, `export fc_elsct_init`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: integration 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.