Setting A Lan Attribute; Selecting Memory Mapping; Resetting The Transmitter And Receiver Again - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

For the default case, sets the lm_media member to LAN_MEDIA_UTP
10
(media mode is unshielded twisted pair cable).
Determines whether lm_media evaluates to LAN_MEDIA_UTP.
11
Calls WRITE_ACR to write to the address control register. The data to
12
be written establishes the Ethernet unshielded twisted-pair cable as
the media.
Calls WRITE_CMD to write to the command port register. The data to be
13
written is the window 4 diagnostic command bit (CMD_WINDOW4).
Calls the WRITE_MD macro to write data to the media type and status
14
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,
Sets the LAN media type attribute for EHM support.
1

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) {
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|
i |= (ASI_PAR_11 | ASI_RSIZE32);
WRITE_DATA(sc, i);
}
}
If the if_el device driver operates on the PCMCIA bus, performs a
1
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.
lan_media_strings[sc->lm_media]);
1
ASI_PAR_35|ASI_PAR_13|ASI_PAR_11);
Implementing the Initialization Section 8–7
1

Advertisement

Table of Contents
loading

Table of Contents