Compaq AA-RNG2A-TE Network Card User Manual


 
WRITE_CMD(sc, CMD_RXENA); 1
WRITE_CMD(sc, CMD_TXENA); 2
1 Calls the WRITE_CMD macro to write data to the command port register.
The data to be written is the receive (RX) enable command (CMD_RXENA).
2 Calls the WRITE_CMD macro to write data to the command port register.
In this call, the data to be written is the transmit (TX) enable command
(CMD_TXENA).
8.2.13 Enabling Interrupts
The following code shows how the el_init_locked( ) routine enables
interrupts. Make sure that you perform similar initialization tasks for the
hardware device that your network driver controls.
LAN device drivers typically do not perform polling operations. However,
this example shows how polling operations can be done on the 3Com 3C5x9
device.
if (!el_polling) {
1
WRITE_CMD(sc, CMD_ZINTMASK+0xfe);
WRITE_CMD(sc, CMD_SINTMASK+(S_AF|S_TC|S_RC));
} else {
2
WRITE_CMD(sc, CMD_ZINTMASK+0xfe);
WRITE_CMD(sc, CMD_SINTMASK+0);
}
1 If the device is not polling (the el_polling flag is not set), calls
the WRITE_CMD macro to set the interrupt mask and enable adapter
failure (S_AF), transmit complete (S_TC), and receive complete (S_RC)
interrupts.
2 If the device is polling, calls the WRITE_CMD macro to clear the interrupt
mask and disable all interrupts.
8.2.14 Setting the Operational Window
The following code shows how the el_init_locked( ) routine sets the
operational window. This task is specific to the 3Com 3C5x9 device.
WRITE_CMD(sc, CMD_WINDOW1);
1
sc->txfree = READ_TXF(sc);
1 Calls the WRITE_CMD macro to set the operational window register.
8.2.15 Marking the Device as Running
The following code shows how the el_init_locked( ) routine marks the
device as running. All network device drivers perform this task.
810 Implementing the Initialization Section