Acknowledging The Interrupt; Transmitting Pending Frames; Releasing The Simple Lock And Resetting The Ipl - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

If the status variable has the S_AF bit set, calls the el_error( )
routine to process the error.
Calls the READ_STS macro to read the interrupt status again from
the I/O status register.

13.1.5 Acknowledging the Interrupt

The following code shows how the el_intr( ) routine acknowledges the
interrupt:
WRITE_CMD(sc, CMD_ACKINT+(S_IL));
Calls the WRITE_CMD macro to write data to the command port register.
1
In this call, the regE member of the el_softc data structure specifies
the I/O handle that references the register in bus address space. The
acknowledge interrupt (CMD_ACKINT) and interrupt latch (S_IL) bits
specify the data to be written.

13.1.6 Transmitting Pending Frames

The following code shows how the el_intr( ) routine transmits pending
frames:
if (ifp->if_snd.ifq_head) {
el_start_locked(sc, ifp);
} else {
ifp->if_timer = 0;
}
Determines whether there are any transmits pending. If so, el_intr( )
1
calls el_start_locked( ) to start the transmit operation.
Otherwise, disables the watchdog timer by setting the el_timer
2
member of the ifnet data structure to 0 (zero).

13.1.7 Releasing the Simple Lock and Resetting the IPL

The following code shows how the el_intr( ) routine releases the simple
lock and resets the IPL:
simple_unlock(&sc->el_softc_lock);
splx(s);
13–4 Implementing the Interrupt Section
1
1
2

Advertisement

Table of Contents
loading

Table of Contents