Registering The Interrupt Handler - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

bcopy(&ee_copy, &sc->eeprom, sizeof(struct w3_eeprom));
}
}
If this is a multifunction card, reads the EEPROM data and saves
1
it in a temporary data structure, ee_copy. If this is a 3Com 3C562
multifunction PC card, the EEPROM data is located in the card
information data structure.
If this is not a multifunction PC card, the EEPROM data is read directly
2
from the card and saved in the el_sofc data structure.
Calls the bcmp( ) routine to compare the EEPROM address from the
3
first probe operation to the EEPROM address of the current probe
operation.
If the EEPROM address has changed, converts the original EEPROM
4
address to its canonical form.
Compares the original EEPROM address to the hardware address that
5
is currently in effect. If they are different, then a previously specified
hardware address was used that was different from the address that
was found in the EEPROM. In this case, the alternate address is still in
effect and no further action needs to be taken.
If the original EEPROM address is the same as the hardware address
6
that is currently in effect, uses the hardware address that was found
in the EEPROM. Because the EEPROM has changed (because the
old if_el adapter was removed and a new one inserted), it will be
necessary to broadcast the new EEPROM hardware address onto
the network to inform the network that there has been a change.
This section of code converts the hardware address from the current
EEPROM to canonical form in preparation for the broadcast message.
Saves the new hardware address in the is_addr member of the
7
el_softc data structure.
If an IP address has been configured for this interface, informs the
8
network that there is a new hardware address for the IP address by
sending out an ARP packet.
Marks this new hardware address as the link address for this interface.
9
Informs the packet filter of the new hardware address.
10
Saves the EEPROM contents in the el_softc data structure.
11

5.1.11 Registering the Interrupt Handler

The following code shows how the el_probe( ) routine registers the
interrupt handler. The Writing Device Drivers manual provides detailed
information on the data structures and routines that relate to the
5–14 Implementing the Autoconfiguration Support Section (probe)
11

Advertisement

Table of Contents
loading

Table of Contents