5
Implementing the Autoconfiguration Support Section (probe)
The autoconfiguration support section contains the code that implements a network device driver’s probe interface. A network device driver’s probe interface determines whether the network device exists and is functional on a given system. The bus configuration code calls the driver’s probe interface.
The if_el driver operates on the ISA and PCMCIA bus. For the PCMCIA bus, it provides a
The following sections describe how to use the probe interface:
•Implementing the el_probe( ) routine (Section 5.1)
•Implementing the el_shutdown( ) routine (Section 5.2)
•Implementing the el_autosense_thread( ) routine (Section 5.3)
5.1Implementing the el_probe Routine
The el_probe( ) routine performs the following tasks:
•Checks the maximum number of devices that the driver supports (Section 5.1.2)
•Performs
•Allocates memory for the softc and ether_driver data structures (Section 5.1.4 and Section 5.1.5)
•Initializes the enhanced hardware management data structure (Section 5.1.6)
•Computes the control and status register addresses (Section 5.1.7)
•Sets
•If this is the first time the device has been probed, copies data from the EEPROM, reads and saves the device’s physical address and starts the autosense kernel thread to determine the media type (Section 5.1.9)
Implementing the Autoconfiguration Support Section (probe)