Because simple locks are spin locks,
simple_lock( )
does not return
until the lock has been obtained.
The
el_softc_lock
member of the
el_softc
data structure points to
a simple lock data structure. The
if_el
device driver declares this data
structure by calling the
decl_simple_lock_data( )
routine.
4
Calls the
WRITE_CMD
macro to write data to the command port register.
In this call,
el_autosense_thread( )
passes the
if_el
driver’s
el_softc
data structure pointer. The data to be written is the statistics
disable command (
CMD_STATDIS
).
5
Releases the simple lock and resets the IPL.
6
Calls the
splx( )
routine to reset the CPU priority to the level that is
stored in the
s
variable.
5–26 Implementing the Autoconfiguration Support Section (probe)