Managing Excessive Data Collisions; Writing To The Status Register To Obtain The Next Value - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

WRITE_CMD(sc, CMD_TXRESET);
DELAY(10);
WRITE_CMD(sc, CMD_TXENA);
Calls the READ_TXS macro to read the transmit status from the
1
transmit status register.
Examines the status for a jabber or an underrun error. If either of these
2
errors happened, then the transmitter must be reset.
Clears the transmit status register and resets the transmitter.
3
Calls the DELAY macro to wait for 10 microseconds before reenabling
4
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++;
ifp->if_collisions+=2;
if (sc->ctrblk.est_sendfail != 0xffff)
sc->ctrblk.est_sendfail++;
sc->ctrblk.est_sendfail_bm |= 1;
WRITE_TXS(sc, status);
WRITE_CMD(sc, CMD_TXENA);
} else {
Increments the output errors because the excessive data collisions
1
status means that the transmit failed.
Indicates excessive collisions.
2

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);
}
status = READ_TXS(sc);
}
sc->txfree = READ_TXF(sc);
if (sc->debug)
if (count <= 0)
printf("el%d: Transmit in INFINITE loop %04X\n", ifp->if_unit,
status);
Writes to the transmit status register to clear the current status in
1
preparation for reading the status for the next transmit completion
(if any).
4
1
2
1
2
Implementing the Interrupt Section 13–11

Advertisement

Table of Contents
loading

Table of Contents