Compaq AA-RNG2A-TE manual Acknowledging the Interrupt, Transmitting Pending Frames

Models: AA-RNG2A-TE

1 159
Download 159 pages 42.56 Kb
Page 142
Image 142

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.5Acknowledging the Interrupt

The following code shows how the el_intr( ) routine acknowledges the interrupt:

WRITE_CMD(sc, CMD_ACKINT+(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

2

Determines whether there are any transmits pending. If so, el_intr( ) calls el_start_locked( ) to start the transmit operation.

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–4Implementing the Interrupt Section

Page 142
Image 142
Compaq AA-RNG2A-TE manual Acknowledging the Interrupt, Transmitting Pending Frames