Compaq AA-RNG2A-TE Network Card User Manual


 
This simple lock was previously asserted by calling the simple_lock( )
or simple_lock_try( ) routine.
2
Calls the splx( ) routine to reset the CPU priority to the level that the
s variable specifies.
9.2 Implementing the el_start_locked Routine
The el_start_locked( ) routine performs the start operation. It is
called by the if_el device drivers el_init_locked( ), el_start( ),
el_intr( ), and el_autosense_thread( ) routines.
The el_start_locked( ) routine performs the following tasks:
Discards all transmits if the user has removed the PCMCIA card
(Section 9.2.1)
Removes packets from the pending queue and prepares the transmit
buffer (Section 9.2.2)
Transmits the packets (Section 9.2.3)
Accounts for the outgoing bytes (Section 9.2.4)
Updates counters, frees the transmit buffer, and marks the output
process as active (Section 9.2.5)
Indicates when to start the watchdog interface (Section 9.2.6)
______________________ Note _______________________
If you decide not to implement your start section as a jacket
routine, then some of the tasks listed in this section would be
performed by your start section.
9.2.1 Discarding All Transmits After the User Removes the PCMCIA
Card
The following code shows how the el_start_locked( ) routine discards all
pending transmits after the user has removed the card from the system.
static void el_start_locked(struct el_softc *sc,
struct ifnet *ifp)
{
struct mbuf *m, *ms, *mp, *mn;
int len, i, j, val;
unsigned char *dat;
struct ether_header *eh;
1
if (sc->cardout) { 2
Implementing the Start Section 93