Compaq AA-RNG2A-TE manual Determining Whether Packets Were Transmitted Successfully

Models: AA-RNG2A-TE

1 159
Download 159 pages 42.56 Kb
Page 82
Image 82

1

WRITE_CMD(sc, CMD_WINDOW1);

simple_unlock(&sc->el_softc_lock); splx(s);

break;

default:

break;

}

Tests for loss of carrier errors. Most network adapters give carrier errors if no cable is plugged in or if transceivers are not present.

5.3.14 Determining Whether Packets Were Transmitted Successfully

The following code shows how the el_autosense_thread( ) routine determines whether packets were successfully transmitted:

if ((prev_err == ifp->if_oerrors) && (prev_tmo == sc->xmit_tmo) && (wait < 5)) { 1 good_xmits++;

if (sc->debug)

printf("el%d: autosense: %s packet sent OK (%d)\n", ifp->if_unit, lan_media_strings_10[sc->lm_media], good_xmits);

} else { good_xmits = 0;

1

Determines whether traffic went out successfully.

5.3.15 Printing Debug Information

The following code shows how the el_autosense_thread( ) routine prints debug information:

if (sc->debug) { 1

if (prev_err != ifp->if_oerrors) printf("el%d: autosense: %s transmit error\n",

ifp->if_unit,

lan_media_strings_10[sc->lm_media]); if (prev_tmo != sc->xmit_tmo)

printf("el%d: autosense: %s driver transmit timeout\n", ifp->if_unit, lan_media_strings_10[sc->lm_media]);

if ((wait >= 5) && (wait < 100))

printf("el%d: autosense: %s transmit timeout\n", ifp->if_unit, lan_media_strings_10[sc->lm_media]);

}

1

Prints debugging information (if requested).

5.3.16 Setting Up New Media

The following code shows how the el_autosense_thread( ) routine selects new media to try if the transmit operation failed:

switch (sc->lm_media) { case LAN_MEDIA_AUI:

1

5–24Implementing the Autoconfiguration Support Section (probe)

Page 82
Image 82
Compaq AA-RNG2A-TE manual Determining Whether Packets Were Transmitted Successfully, Printing Debug Information