
if
break;
case LAN_MEDIA_BNC:
if
break;
case LAN_MEDIA_UTP: default:
if
break;
}
}
2
}
1
2
Selects new media.
Calls the el_reset( ) routine to reset the hardware. This reset will establish the next media to try.
5.3.17 Establishing the Media
The following code shows how the el_autosense_thread( ) routine establishes the new media:
}
if
if
printf("el%d: No Link Beat signal\n",
}
}
}
1
2
3
Sets the lm_media_state member of the softc data structure to LAN_MEDIA_STATE_DETERMINED. This indicates that the driver has successfully selected a media mode.
Calls the splimp( ) routine to mask all LAN hardware interrupts. Upon successful completion, splimp( ) stores an integer value in the s variable. This value represents the CPU priority level that existed before the call to splimp( ).
Calls the simple_lock( ) routine to assert a lock with exclusive access for the resource that is associated with the el_softc_lock data structure. This means that no other kernel thread can gain access to the locked resource until you call simple_unlock( ) to release it.