probe man page on Solaris

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
Solaris logo
[printable version]

probe(9E)		      Driver Entry Points		     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 intprefixprobe(dev_info_t *dip);

INTERFACE LEVEL
       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.

ARGUMENTS
       dip	Pointer to the device's	 dev_info structure.

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) or  ddi_poke(9F)
       and  determine  if the device exists.  Then the device registers should
       be unmapped using ddi_unmap_regs(9F).

       To probe a device that was left powered off after the last detach(), it
       might  be necessary to power it up. If so, the driver must power up the
       device by accessing device registers directly. pm_raise_power(9F)  will
       be  not	be available until attach(9E).	The framework ensures that the
       ancestors of the node being probed and all  relevant  platform-specific
       power  management hardware is at full power at the time that probe() is
       called.

       probe() should only probe the device. It should not change any software
       state  and should not create any software state.	 Device initialization
       should be done in attach(9E).

       For a self-identifying device, this entry point is not necessary.  How‐
       ever,  if a device exists in both self-identifying and non-self-identi‐
       fying 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.

RETURN VALUES
       "small and bold">DDI_PROIf_theCprobe was successful.

       DDI_PROBE_FAILURE       If the probe failed.

       DDI_PROBE_DONTCARE      If the probe was unsuccessful,  yet  attach(9E)
			       should still be called.

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

SEE ALSO
       attach(9E),   identify(9E),    ddi_dev_is_sid(9F),    ddi_map_regs(9F),
       ddi_peek(9F), ddi_poke(9F), nulldev(9F), dev_ops(9S)

       Writing Device Drivers

SunOS 5.10			  18 Nov 1992			     probe(9E)
[top]

List of man pages available for Solaris

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net