drivers/net/fddi/skfp/smt.c
Source file repositories/reference/linux-study-clean/drivers/net/fddi/skfp/smt.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/fddi/skfp/smt.c- Extension
.c- Size
- 51314 bytes
- Lines
- 2005
- 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.hlinux/bitrev.hlinux/kernel.hh/smtstate.h
Detected Declarations
function is_my_addrfunction is_broadcastfunction is_individualfunction is_equalfunction smt_agent_initfunction smt_agent_taskfunction smt_emulate_token_ctfunction smt_eventfunction div_ratiofunction update_dacfunction requestfunction requestfunction smt_echo_testfunction smt_add_frame_lenfunction smt_fill_unafunction smt_fill_sdefunction smt_fill_statefunction smt_fill_timestampfunction smt_set_timestampfunction smt_fill_policyfunction smt_fill_latencyfunction smt_fill_neighborfunction smt_fill_pathfunction smt_fill_mac_statusfunction smt_fill_lemfunction smt_fill_versionfunction smt_fill_fscfunction smt_fill_mac_counterfunction smt_fill_mac_fncfunction smt_fill_manufacturerfunction smt_fill_userfunction smt_fill_setcountfunction smt_fill_echofunction smt_clear_una_dnafunction smt_clear_old_una_dnafunction smt_get_tidfunction smt_check_parafunction fddi_send_antcfunction mac_indexfunction phy_indexfunction mac_con_resource_indexfunction phy_con_resource_indexfunction entity_to_indexfunction smt_swap_shortfunction smt_string_swapfunction smt_actionfunction hwm_conv_can
Annotated Snippet
if (smc->sm.please_reconnect == 0) {
/* Counted down */
queue_event(smc,EVENT_ECM,EC_CONNECT) ;
}
}
if (event == SM_FAST)
return ;
/*
* timer for periodic cleanup in driver
* reset and start the watchdog (FM2)
* ESS timer
* SBA timer
*/
smt_timer_poll(smc) ;
smt_start_watchdog(smc) ;
#ifndef SLIM_SMT
#ifndef BOOT
#ifdef ESS
ess_timer_poll(smc) ;
#endif
#endif
#ifdef SBA
sba_timer_poll(smc) ;
#endif
smt_srf_event(smc,0,0,0) ;
#endif /* no SLIM_SMT */
time = smt_get_time() ;
if (time - smc->sm.smt_last_lem >= TICKS_PER_SECOND*8) {
/*
* Use 8 sec. for the time intervall, it simplifies the
* LER estimation.
*/
struct fddi_mib_m *mib ;
u_long upper ;
u_long lower ;
int cond ;
int port;
struct s_phy *phy ;
/*
* calculate LEM bit error rate
*/
sm_lem_evaluate(smc) ;
smc->sm.smt_last_lem = time ;
/*
* check conditions
*/
#ifndef SLIM_SMT
mac_update_counter(smc) ;
mib = smc->mib.m ;
upper =
(mib->fddiMACLost_Ct - mib->fddiMACOld_Lost_Ct) +
(mib->fddiMACError_Ct - mib->fddiMACOld_Error_Ct) ;
lower =
(mib->fddiMACFrame_Ct - mib->fddiMACOld_Frame_Ct) +
(mib->fddiMACLost_Ct - mib->fddiMACOld_Lost_Ct) ;
mib->fddiMACFrameErrorRatio = div_ratio(upper,lower) ;
cond =
((!mib->fddiMACFrameErrorThreshold &&
mib->fddiMACError_Ct != mib->fddiMACOld_Error_Ct) ||
(mib->fddiMACFrameErrorRatio >
mib->fddiMACFrameErrorThreshold)) ;
if (cond != mib->fddiMACFrameErrorFlag)
smt_srf_event(smc,SMT_COND_MAC_FRAME_ERROR,
INDEX_MAC,cond) ;
upper =
(mib->fddiMACNotCopied_Ct - mib->fddiMACOld_NotCopied_Ct) ;
lower =
upper +
(mib->fddiMACCopied_Ct - mib->fddiMACOld_Copied_Ct) ;
mib->fddiMACNotCopiedRatio = div_ratio(upper,lower) ;
cond =
((!mib->fddiMACNotCopiedThreshold &&
mib->fddiMACNotCopied_Ct !=
mib->fddiMACOld_NotCopied_Ct)||
(mib->fddiMACNotCopiedRatio >
mib->fddiMACNotCopiedThreshold)) ;
if (cond != mib->fddiMACNotCopiedFlag)
smt_srf_event(smc,SMT_COND_MAC_NOT_COPIED,
Annotation
- Immediate include surface: `h/types.h`, `h/fddi.h`, `h/smc.h`, `h/smt_p.h`, `linux/bitrev.h`, `linux/kernel.h`, `h/smtstate.h`.
- Detected declarations: `function is_my_addr`, `function is_broadcast`, `function is_individual`, `function is_equal`, `function smt_agent_init`, `function smt_agent_task`, `function smt_emulate_token_ct`, `function smt_event`, `function div_ratio`, `function update_dac`.
- 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.