Compaq AA-RNG2A-TE Network Card User Manual


 
WRITE_CMD(sc, CMD_TXRESET);
DELAY(10);
4
WRITE_CMD(sc, CMD_TXENA);
1 Calls the READ_TXS macro to read the transmit status from the
transmit status register.
2 Examines the status for a jabber or an underrun error. If either of these
errors happened, then the transmitter must be reset.
3 Clears the transmit status register and resets the transmitter.
4 Calls the DELAY macro to wait for 10 microseconds before reenabling
the transmitter.
13.3.3 Managing Excessive Data Collisions
The following code shows how the el_tint( ) routine manages excessive
data collisions:
} else if (status & (TX_MC<<8)) {
ifp->if_oerrors++;
1
ifp->if_collisions+=2;
if (sc->ctrblk.est_sendfail != 0xffff)
sc->ctrblk.est_sendfail++;
sc->ctrblk.est_sendfail_bm |= 1;
2
WRITE_TXS(sc, status);
WRITE_CMD(sc, CMD_TXENA);
} else {
1 Increments the output errors because the excessive data collisions
status means that the transmit failed.
2 Indicates excessive collisions.
13.3.4 Writing to the Status Register to Obtain the Next Value
The following code shows how the el_tint() routine writes to the status
register to obtain the next value:
WRITE_TXS(sc, status);
1
}
status = READ_TXS(sc);
}
sc->txfree = READ_TXF(sc);
2
if (sc->debug)
if (count <= 0)
printf("el%d: Transmit in INFINITE loop %04X\n", ifp->if_unit,
status);
1 Writes to the transmit status register to clear the current status in
preparation for reading the status for the next transmit completion
(if any).
Implementing the Interrupt Section 1311