2
Calls the simple_lock( ) routine to assert a lock with exclusive access for the resource that is associated with the el_softc_lock simple lock data structure pointer. This means that no other kernel thread can gain access to the locked resource until you call simple_unlock( ) to release it. Because simple locks are spin locks, simple_lock( ) does not return until the lock has been obtained.
10.2Incrementing the Transmit Timeout Counter and Resetting the Unit
The following code shows how the el_watch( ) routine counts the number of transmit timeouts, clears the timer, and resets the unit:
1
el_reset_locked(sc, ifp, unit);
2
1
2
Increments the transmit timeout counter, which stores the number of times transmit timeouts occur.
Calls the el_reset_locked( ) routine to reset the device.
10.3 Releasing the Simple Lock and Resetting the IPL
The following code shows how the el_watch( ) routine releases the simple lock and resets the IPL.
return(0);
}