Compaq AA-RNG2A-TE Network Card User Manual


 
10 For the default case, sets the lm_media member to LAN_MEDIA_UTP
(media mode is unshielded twisted pair cable).
11 Determines whether lm_media evaluates to LAN_MEDIA_UTP.
12 Calls WRITE_ACR to write to the address control register. The data to
be written establishes the Ethernet unshielded twisted-pair cable as
the media.
13 Calls WRITE_CMD to write to the command port register. The data to be
written is the window 4 diagnostic command bit (CMD_WINDOW4).
14 Calls the WRITE_MD macro to write data to the media type and status
register. The data to be written consists of the original data from that
register but with the link beat enabled (MD_LBE) and the jabber enabled
(MD_JABE) bits set.
8.2.6 Setting a LAN Attribute
The following code shows how the el_init_locked( ) routine sets the LAN
media type attribute for enhanced hardware management (EHM) support:
lan_set_attribute(sc->ehm.current_val, NET_MEDIA_NDX,
lan_media_strings[sc->lm_media]);
1
1 Sets the LAN media type attribute for EHM support.
8.2.7 Selecting Memory Mapping
The following code shows how the el_init_locked( ) routine selects
memory mapping. This task is specific to the 3Com 3C5x9 device.
if (ctlr->bus_hd->bus_type == BUS_PCMCIA) {
1
WRITE_CMD(sc, CMD_WINDOW0);
i = READ_CCR(sc);
if ((i & 0xc000) == 0x8000) {
WRITE_CMD(sc, CMD_WINDOW3);
i = sc->eeprom.icw & ~(ASI_RS|ASI_RS|ASI_RSIZE8|ASI_RSIZE32|
ASI_PAR_35|ASI_PAR_13|ASI_PAR_11);
i |= (ASI_PAR_11 | ASI_RSIZE32);
WRITE_DATA(sc, i);
}
}
1 If the if_el device driver operates on the PCMCIA bus, performs a
read operation and a number of write operations to select the memory
mapping.
8.2.8 Resetting the Transmitter and Receiver Again
The following code shows how the el_init_locked( ) routine resets the
transmitter and receiver a second time. This task is specific to the 3Com
3C5x9 device. Make sure that you perform similar initialization tasks for
the hardware device that your network driver controls.
Implementing the Initialization Section 87