Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ probe(9E) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

attach(9E)

identify(9E)

ddi_map_regs(9F)

ddi_peek(9F)

ddi_poke(9F)

probe(9E)

NAME

probe − determine if a non-self-identifying device is present

SYNOPSIS

#include <sys/conf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
static int prefixprobe(dev_info_t ∗dip);

INTERFACE LEVEL

Solaris architecture specific (SunDDI).  This entry point is Required for non-self-identifying devices.  You must write it for such devices. 

DESCRIPTION

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 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 may not be necessary. 

RETURN VALUES

probe() should return:

DDI_PROBE_SUCCESS
if the probe was successful.

DDI_PROBE_FAILURE if the probe failed,

DDI_PROBE_DONTCARE
if the probe was unsuccessful, yet prefixattach() should still be called, and

DDI_PROBE_PARTIAL if the instance is not present now, but may be present in the future. 

SEE ALSO

attach(9E), identify(9E), ddi_map_regs(9F), ddi_peek(9F), ddi_poke(9F)

SunOS 5.1 Writing Device Drivers

SunOS 5.1  —  Last change: 5 Feb 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026