8.4. Skeleton of NIC Registration and UnregistrationFigure 8-1(a) shows the generic scheme for an NIC's device driver to register with the networking code. Figure 8-1(b) shows the complementary action that takes place for unregistration. Although the example shows a PCI Ethernet NIC, the scheme is the same for other device types; only the name of the routine that takes care of it, or the way that routine is invoked, may change depending on how the bus code is implemented. Figure 8-1. (a) Device registration model; (b) device unregistration modelThe function starts by allocating Note that:
The unregistration of a device, shown in its simple form in Figure 8-1(b), always includes a call to unregister_netdevice and free_netdev. The call to free_netdev is sometimes made explicitly, and sometimes indirectly via the dev->destructor function,[*] as shown later in Figure 8-4. The device driver also needs to release any resources used by the device (IRQ, memory mappings, etc.), but we are not interested in those details in this chapter.
|
Thursday, October 22, 2009
Section 8.4. Skeleton of NIC Registration and Unregistration
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment