drivers/net/fddi/skfp/smtdef.c
Source file repositories/reference/linux-study-clean/drivers/net/fddi/skfp/smtdef.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/fddi/skfp/smtdef.c- Extension
.c- Size
- 9562 bytes
- Lines
- 348
- 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.h
Detected Declarations
function smt_reset_defaultsfunction smt_init_mibfunction smt_set_mac_opvaluesfunction smt_fixup_mibfunction set_min_max
Annotated Snippet
if (level == 0) {
mib->a[path].fddiPATHTVXLowerBound =
(u_long)(- US2BCLK(27)) ;
mib->a[path].fddiPATHT_MaxLowerBound =
(u_long)(- MS2BCLK(165)) ;
mib->a[path].fddiPATHMaxT_Req =
(u_long)(- MS2BCLK(165)) ;
}
}
/*
* Port attributes
*/
pm = mib->p ;
for (port = 0 ; port < NUMPHYS ; port++) {
/*
* set MIB pointer in phy
*/
/* Attention: don't initialize mib pointer here! */
/* It must be initialized during phase 2 */
smc->y[port].mib = NULL;
mib->fddiSMTPORTIndexes[port] = port+INDEX_PORT ;
pm->fddiPORTIndex = port+INDEX_PORT ;
pm->fddiPORTHardwarePresent = TRUE ;
if (level == 0) {
pm->fddiPORTLer_Alarm = DEFAULT_LEM_ALARM ;
pm->fddiPORTLer_Cutoff = DEFAULT_LEM_CUTOFF ;
}
/*
* fddiPORTRequestedPaths are set in pcmplc.c
* we don't know the port type yet !
*/
pm->fddiPORTRequestedPaths[1] = 0 ;
pm->fddiPORTRequestedPaths[2] = 0 ;
pm->fddiPORTRequestedPaths[3] = 0 ;
pm->fddiPORTAvailablePaths = MIB_PATH_P ;
pm->fddiPORTPMDClass = MIB_PMDCLASS_MULTI ;
pm++ ;
}
(void) smt_set_mac_opvalues(smc) ;
}
int smt_set_mac_opvalues(struct s_smc *smc)
{
int st ;
int st2 ;
st = set_min_max(1,smc->mib.m[MAC0].fddiMACTvxValueMIB,
smc->mib.a[PATH0].fddiPATHTVXLowerBound,
&smc->mib.m[MAC0].fddiMACTvxValue) ;
st |= set_min_max(0,smc->mib.m[MAC0].fddiMACT_MaxMIB,
smc->mib.a[PATH0].fddiPATHT_MaxLowerBound,
&smc->mib.m[MAC0].fddiMACT_Max) ;
st |= (st2 = set_min_max(0,smc->mib.m[MAC0].fddiMACT_ReqMIB,
smc->mib.a[PATH0].fddiPATHMaxT_Req,
&smc->mib.m[MAC0].fddiMACT_Req)) ;
if (st2) {
/* Treq attribute changed remotely. So send an AIX_EVENT to the
* user
*/
AIX_EVENT(smc, (u_long) FDDI_RING_STATUS, (u_long)
FDDI_SMT_EVENT, (u_long) FDDI_REMOTE_T_REQ,
smt_get_event_word(smc));
}
return st;
}
void smt_fixup_mib(struct s_smc *smc)
{
#ifdef CONCENTRATOR
switch (smc->s.sas) {
case SMT_SAS :
smc->mib.fddiSMTNonMaster_Ct = 1 ;
break ;
case SMT_DAS :
smc->mib.fddiSMTNonMaster_Ct = 2 ;
break ;
case SMT_NAC :
smc->mib.fddiSMTNonMaster_Ct = 0 ;
break ;
}
smc->mib.fddiSMTMaster_Ct = NUMPHYS - smc->mib.fddiSMTNonMaster_Ct ;
#else
switch (smc->s.sas) {
case SMT_SAS :
smc->mib.fddiSMTNonMaster_Ct = 1 ;
break ;
Annotation
- Immediate include surface: `h/types.h`, `h/fddi.h`, `h/smc.h`.
- Detected declarations: `function smt_reset_defaults`, `function smt_init_mib`, `function smt_set_mac_opvalues`, `function smt_fixup_mib`, `function set_min_max`.
- 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.