•
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(S_IL));
1
1
Calls the
WRITE_CMD
macro to write data to the command port register.
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) {
1
el_start_locked(sc, ifp);
} else {
ifp->if_timer = 0;
2
}
1
Determines whether there are any transmits pending. If so,
el_intr( )
calls
el_start_locked( )
to start the transmit operation.
2
Otherwise, disables the watchdog timer by setting the
el_timer
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