drivers/net/fddi/skfp/smtinit.c
Source file repositories/reference/linux-study-clean/drivers/net/fddi/skfp/smtinit.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/fddi/skfp/smtinit.c- Extension
.c- Size
- 2735 bytes
- Lines
- 118
- 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 set_oem_spec_val
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/******************************************************************************
*
* (C)Copyright 1998,1999 SysKonnect,
* a business unit of Schneider & Koch & Co. Datensysteme GmbH.
*
* See the file "skfddi.c" for further information.
*
* The information in this file is provided "AS IS" without warranty.
*
******************************************************************************/
/*
Init SMT
call all module level initialization routines
*/
#include "h/types.h"
#include "h/fddi.h"
#include "h/smc.h"
void init_fddi_driver(struct s_smc *smc, const u_char *mac_addr);
/* define global debug variable */
#if defined(DEBUG) && !defined(DEBUG_BRD)
struct smt_debug debug;
#endif
#ifndef MULT_OEM
#define OEMID(smc,i) oem_id[i]
extern u_char oem_id[] ;
#else /* MULT_OEM */
#define OEMID(smc,i) smc->hw.oem_id->oi_mark[i]
extern struct s_oem_ids oem_ids[] ;
#endif /* MULT_OEM */
/*
* Set OEM specific values
*
* Can not be called in smt_reset_defaults, because it is not sure that
* the OEM ID is already defined.
*/
static void set_oem_spec_val(struct s_smc *smc)
{
struct fddi_mib *mib ;
mib = &smc->mib ;
/*
* set IBM specific values
*/
if (OEMID(smc,0) == 'I') {
mib->fddiSMTConnectionPolicy = POLICY_MM ;
}
}
/*
* Init SMT
*/
int init_smt(struct s_smc *smc, const u_char *mac_addr)
/* u_char *mac_addr; canonical address or NULL */
{
int p ;
#if defined(DEBUG) && !defined(DEBUG_BRD)
debug.d_smt = 0 ;
debug.d_smtf = 0 ;
debug.d_rmt = 0 ;
debug.d_ecm = 0 ;
debug.d_pcm = 0 ;
debug.d_cfm = 0 ;
debug.d_plc = 0 ;
#ifdef ESS
debug.d_ess = 0 ;
#endif
#ifdef SBA
debug.d_sba = 0 ;
#endif
#endif /* DEBUG && !DEBUG_BRD */
/* First initialize the ports mib->pointers */
for ( p = 0; p < NUMPHYS; p ++ ) {
smc->y[p].mib = & smc->mib.p[p] ;
}
set_oem_spec_val(smc) ;
(void) smt_set_mac_opvalues(smc) ;
init_fddi_driver(smc,mac_addr) ; /* HW driver */
smt_fixup_mib(smc) ; /* update values that depend on s.sas */
Annotation
- Immediate include surface: `h/types.h`, `h/fddi.h`, `h/smc.h`.
- Detected declarations: `function set_oem_spec_val`.
- 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.