Compaq AA-RNG2A-TE Network Card User Manual


 
access a CSR directly. The driver-specific macros handle the read and write
operations that are made on these device registers.
The following code shows the declarations of the CSR addresses in the if_el
device drivers el_softc data structure. Make sure that the CSR pointer
information part of your softc data structure has similar declarations.
io_handle_t regE; 1
io_handle_t regC;
io_handle_t regA;
io_handle_t reg8;
io_handle_t reg6;
io_handle_t reg4;
io_handle_t reg2;
io_handle_t reg0;
io_handle_t data;
1 Declares the CSR addresses for the if_el driver. These addresses are
computed during the probe( ) routine by adding the specified offset
(0xE, 0xC, 0xA, and so forth) to the base address.
3.8 Defining FIFO Maintenance Information
The first-in/first-out (FIFO) maintenance information in the if_el drivers
el_softc data structure consists of a variable that stores a value that
the device keeps on board. The following code shows its declaration. This
information is hardware-specific, so you can omit it from your network
device drivers softc data structure.
unsigned long txfree;
3.9 Defining Bus-Specific Information
The bus-specific information in a network drivers softc data structure
consists of information about the bus or buses on which the driver operates.
The if_el driver operates on the PCMCIA and ISA buses, so that the
information in this section reflects these buses.
The following code shows the bus-specific declarations in the if_el device
drivers el_softc data structure. The bus-specific information that is
described here may not apply to your network device driver. However, the
declarations do give you an idea of some of the information that a network
driver needs to keep when operating on the PCMCIA and ISA buses.
int irq;
1
int iobase; 2
int isa_tag; 3
int cardout; 4
int reprobe; 5
int ispcmcia; 6
struct card_info *cinfop; 7
1 Contains the interrupt request (IRQ) to use.
Defining the softc Data Structure 37