8
9
10
11
12
13
14
Calls the kernel_thread_w_arg( ) routine to create and start a kernel thread with timeshare scheduling. A kernel thread that is created with timeshare scheduling means that its priority degrades if it consumes an inordinate amount of CPU resources. Make sure that your device driver calls kernel_thread_w_arg( ) only for
The kernel_thread_w_arg( ) routine returns a pointer to the thread data structure for the newly created thread. The device driver stores this pointer in the autosense_thread member of the el_softc data structure.
If the value that kernel_thread_w_arg( ) returns is NULL, then the thread could not be created. At this point, the el_probe( ) routine must undo previous work and return a failure indication to the caller.
For PCMCIA versions of the card, unregisters the callback routine that was previously registered.
Deallocates the ether_driver data structure for this device.
Frees up any memory that was allocated for enhanced hardware management and unregisters this card from the hardware management database.
Calls the FREE macro, which frees the memory that was previously allocated for the el_softc data structure.
Returns the value 0 (zero) to indicate that the probe operation failed.
5.1.10 Handling Subsequent Probe Operations
If the device had already been probed, the if_el device driver reads the EEPROM to determine whether the hardware address has changed. The following code shows how the el_probe( ) routine performs these tasks:
} else {
struct w3_eeprom ee_copy; unsigned char tmp_addr[8]; struct ifreq ifr;
struct ifnet *ifp =
if (multi_func_flag) {
1
bzero((caddr_t)&tuple_data, sizeof(struct tuple_data_info)); tuple_data_infop = &tuple_data;
tuple_infop = (struct tuple_info *)&tuple_data;
status = GetFirstTuple(tuple_infop);
if (status == SUCCESS) {