Implementing The El_Reset_Locked Routine - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

Calls the el_reset_locked( ) routine, which performs the actual
3
tasks that are associated with resetting the device.
Calls the simple_unlock( ) routine to release the simple lock for the
4
el_softc data structure and then resets the CPU priority to the level
that it was originally at upon entrance to this routine.

11.2 Implementing the el_reset_locked Routine

The following code shows how the el_reset_locked( ) routine resets
and restarts the hardware:
static void el_reset_locked(struct el_softc *sc,
struct ifnet *ifp,
{
ifp->if_flags &= ~ IFF_RUNNING; 1
el_init_locked(sc, ifp, unit);
}
Indicates that the device is no longer running by clearing the
1
IFF_RUNNING bit in the interface flags structure member.
Calls the el_init_locked( ) routine. See Section 8.2 for a description
2
of the el_init_locked( ) routine.
11–2 Implementing the Reset Section
int unit)
2

Advertisement

Table of Contents
loading

Table of Contents