Compaq AA-RNG2A-TE Network Card User Manual


 
The following code shows the declarations of the timeout and interrupt
information in the if_el device drivers el_softc data structure:
unsigned long txreset; 1
unsigned long xmit_tmo; 2
unsigned long tint; 3
unsigned long rint; 4
1
Contains the number of transmitter error resets.
2 Contains the number of times that transmit timeouts occurred. The
el_watch( ) routine increments this member.
3 Contains the count of transmit interrupts.
4 Contains the count of receive interrupts.
3.13 Defining Autosense Kernel Thread Context Information
The autosense kernel thread context information in the if_el drivers
el_softc data structure consists of information about the kernel thread
that performs the autosense operation. For the if_el driver, this kernel
thread is called el_autosense_thread.
The following code shows the declarations of the autosense kernel thread
variables in the if_el device drivers el_softc data structure. The if_el
device driver uses kernel threads to perform the tasks that are related to
autosensing the media. However, you can choose other methods instead of
kernel threads.
thread_t autosense_thread;
1
int autosense_flag; 2
1 Contains the autosense kernel thread ID.
2 Contains the autosense kernel thread blocking flag.
3.14 Defining the Polling Context Flag
A LAN driver typically does not need to perform polling operations. However,
the if_el driver provides an example of how polling operations might be
accomplished.
The polling context flag in a network drivers softc data structure indicates
whether polling is on or off. The following code shows the declaration of the
polling member in the if_el device drivers el_softc data structure:
int polling_flag; 1
1 Declares a polling context flag member called polling_flag. This
member stores a boolean value of 1 (polling context is on) or 0 (polling
context is off).
Defining the softc Data Structure 39