Starting The Autosense Kernel Thread; Starting The Transmit Of Pending Packets - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &=
Sets the IFF_RUNNING flag to mark the device as running.
1
Clears the IFF_OACTIVE flag to indicate that there is no output
2
outstanding.

8.2.16 Starting the Autosense Kernel Thread

The following code shows how the el_init_locked( ) routine starts the
autosense kernel thread. Only network device drivers that implement an
autosense kernel thread perform this task.
if (sc->lm_media_mode == LAN_MODE_AUTOSENSE) {
sc->lm_media_state = LAN_MEDIA_STATE_SENSING;
thread_wakeup_one((vm_offset_t)&sc->autosense_flag);
}
If in autosense mode, starts the autosense kernel thread.
1

8.2.17 Starting the Transmit of Pending Packets

The following code shows how the el_init_locked( ) routine starts
transmitting pending packets. Because el_init_locked( ) may have
been called as a result of an error or a reset operation, it needs to examine
its transmit queue for any pending transmit requests. If there are any, it
starts transmitting them.
if (ifp->if_snd.ifq_head)
el_start_locked(sc, ifp);
return ESUCCESS;
}
If there are any pending packets, starts transmitting them by calling
1
the el_start_locked( ) routine.
Returns ESUCCESS to the calling routine.
2
1
~ IFF_OACTIVE;
2
1
2
Implementing the Initialization Section 8–11
1

Advertisement

Table of Contents
loading

Table of Contents