|
|
#include <sys/conf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h> static int prefixprobe(dev_info_t *dip);
Solaris DDI specific (Solaris DDI). This entry point is required for non-self-identifying devices. You must write it for such devices. For self-identifying devices, nulldev.9f should be specified in the dev_ops.9s structure if a probe routine is not necessary.
probe() determines whether the device corresponding to dip actually exists and is a valid device for this driver. probe() is called after identify.9e and before attach.9e for a given dip. For example, the probe() routine can map the device registers using ddi_map_regs.9f then attempt to access the hardware using ddi_peek.9f and/or ddi_poke.9f and determine if the device exists. Then the device registers should be unmapped using ddi_unmap_regs.9f
probe() should only probe the device - it should not create or change any software state. Device initialization should be done in attach.9e
For a self-identifying device, this entry point is not necessary. However, if a device exists in both self-identifying and non-self-identifying forms, a probe() routine can be provided to simplify the driver. ddi_dev_is_sid.9f can then be used to determine whether probe() needs to do any work. See ddi_dev_is_sid.9f for an example.
|
|
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97