Compaq AA-RNG2A-TE manual Setting a LAN Attribute, Selecting Memory Mapping

Models: AA-RNG2A-TE

1 159
Download 159 pages 42.56 Kb
Page 107
Image 107

10

11

12

13

14

For the default case, sets the lm_media member to LAN_MEDIA_UTP (media mode is unshielded twisted pair cable).

Determines whether lm_media evaluates to LAN_MEDIA_UTP.

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.

Calls WRITE_CMD to write to the command port register. The data to be written is the window 4 diagnostic command bit (CMD_WINDOW4).

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_RSASI_RSASI_RSIZE8ASI_RSIZE32 ASI_PAR_35ASI_PAR_13ASI_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 8–7

Page 107
Image 107
Compaq AA-RNG2A-TE manual Setting a LAN Attribute, Selecting Memory Mapping, Resetting the Transmitter and Receiver Again