1
WRITE_CMD(sc, CMD_WINDOW1);
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 ==
if
printf("el%d: autosense: %s packet sent OK (%d)\n",
} 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
if (prev_err !=
printf("el%d: autosense: %s driver transmit timeout\n",
if ((wait >= 5) && (wait < 100))
printf("el%d: autosense: %s transmit timeout\n",
}
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
1