drivers/net/fddi/skfp/ess.c
Source file repositories/reference/linux-study-clean/drivers/net/fddi/skfp/ess.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/fddi/skfp/ess.c- Extension
.c- Size
- 18818 bytes
- Lines
- 718
- Domain
- Driver Families
- Bucket
- drivers/net
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
h/types.hh/fddi.hh/smc.hh/smt_p.h
Detected Declarations
function Supportfunction Requestfunction process_bw_allocfunction ess_send_responsefunction ess_timer_pollfunction ess_send_alc_reqfunction ess_send_framefunction ess_para_changefunction ess_config_fifo
Annotated Snippet
if (sm->smt_type == SMT_REQUEST) {
/*
* process the Allocation request only if the frame is
* local and no static allocation is used
*/
if (!local || smc->mib.fddiESSPayload)
return fs;
p = (void *) sm_to_para(smc,sm,SMT_P0019) ;
for (i = 0; i < 5; i++) {
if (((struct smt_p_0019 *)p)->alloc_addr.a[i]) {
return fs;
}
}
/*
* Note: The Application should send a LAN_LOC_FRAME.
* The ESS do not send the Frame to the network!
*/
smc->ess.alloc_trans_id = sm->smt_tid ;
DB_ESS("ESS: save Alloc Req Trans ID %x", sm->smt_tid);
p = (void *) sm_to_para(smc,sm,SMT_P320F) ;
((struct smt_p_320f *)p)->mib_payload =
smc->mib.a[PATH0].fddiPATHSbaPayload ;
p = (void *) sm_to_para(smc,sm,SMT_P3210) ;
((struct smt_p_3210 *)p)->mib_overhead =
smc->mib.a[PATH0].fddiPATHSbaOverhead ;
sm->smt_dest = smt_sba_da ;
if (smc->ess.local_sba_active)
return fs | I_INDICATOR;
if (!(db = smt_get_mbuf(smc)))
return fs;
db->sm_len = mb->sm_len ;
db->sm_off = mb->sm_off ;
memcpy(((char *)(db->sm_data+db->sm_off)),(char *)sm,
(int)db->sm_len) ;
dump_smt(smc,
(struct smt_header *)(db->sm_data+db->sm_off),
"RAF") ;
smt_send_frame(smc,db,FC_SMT_INFO,0) ;
return fs;
}
/*
* The RAF frame is an Allocation Response !
* check the parameters
*/
if (smt_check_para(smc,sm,plist_raf_alc_res)) {
DB_ESS("ESS: RAF with para problem, ignoring");
return fs;
}
/*
* VERIFY THE FRAME IS WELL BUILT:
*
* 1. path index = primary ring only
* 2. resource type = sync bw only
* 3. trans action id = alloc_trans_id
* 4. reason code = success
*
* If any are violated, discard the RAF frame
*/
if ((((struct smt_p_320b *)sm_to_para(smc,sm,SMT_P320B))->path_index
!= PRIMARY_RING) ||
(msg_res_type != SYNC_BW) ||
(((struct smt_p_reason *)sm_to_para(smc,sm,SMT_P0012))->rdf_reason
!= SMT_RDF_SUCCESS) ||
(sm->smt_tid != smc->ess.alloc_trans_id)) {
DB_ESS("ESS: Allocation Response not accepted");
return fs;
}
/*
* Extract message parameters
*/
p = (void *) sm_to_para(smc,sm,SMT_P320F) ;
if (!p) {
printk(KERN_ERR "ESS: sm_to_para failed");
return fs;
}
payload = ((struct smt_p_320f *)p)->mib_payload ;
p = (void *) sm_to_para(smc,sm,SMT_P3210) ;
if (!p) {
printk(KERN_ERR "ESS: sm_to_para failed");
return fs;
}
Annotation
- Immediate include surface: `h/types.h`, `h/fddi.h`, `h/smc.h`, `h/smt_p.h`.
- Detected declarations: `function Support`, `function Request`, `function process_bw_alloc`, `function ess_send_response`, `function ess_timer_poll`, `function ess_send_alc_req`, `function ess_send_frame`, `function ess_para_change`, `function ess_config_fifo`.
- Atlas domain: Driver Families / drivers/net.
- 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.