Print this page
12309 errors in section 9e of the manual
   1 '\" te
   2 .\" Copyright (c) 2000, Sun Microsystems, Inc.
   3 .\"  All Rights Reserved
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH PROBE 9E "Nov 18, 1992"
   8 .SH NAME
   9 probe \- determine if a non-self-identifying device is present
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 #include <sys/conf.h>
  14 #include <sys/ddi.h>
  15 #include <sys/sunddi.h>
  16 
  17 
  18 
  19 \fBstatic intprefix\fR\fBprobe\fR(\fBdev_info_t *\fR\fIdip\fR);
  20 .fi
  21 
  22 .SH INTERFACE LEVEL
  23 .sp
  24 .LP
  25 Solaris DDI specific (Solaris DDI). This entry point is required for
  26 non-self-identifying devices.  You must write it for such devices. For
  27 self-identifying devices,  \fBnulldev\fR(9F) should be specified in the
  28 \fBdev_ops\fR(9S) structure if a probe routine is not necessary.
  29 .SH ARGUMENTS
  30 .sp
  31 .ne 2
  32 .na
  33 \fB\fIdip\fR \fR
  34 .ad
  35 .RS 8n
  36 Pointer to the device's  \fBdev_info\fR structure.
  37 .RE
  38 
  39 .SH DESCRIPTION
  40 .sp
  41 .LP
  42 \fBprobe()\fR determines whether the device corresponding to \fIdip\fR actually
  43 exists and is a valid device for this driver. \fBprobe()\fR is called after
  44 \fBidentify\fR(9E) and before \fBattach\fR(9E) for a given \fIdip\fR. For
  45 example, the \fBprobe()\fR routine can map the device registers using
  46 \fBddi_map_regs\fR(9F) then attempt to access the hardware using
  47 \fBddi_peek\fR(9F) or \fBddi_poke\fR(9F) and determine if the device exists.
  48 Then the device registers should be unmapped using \fBddi_unmap_regs\fR(9F).
  49 .sp
  50 .LP
  51 To probe a device that was left powered off after the last \fBdetach()\fR, it
  52 might be necessary to power it up. If so, the driver must power up the device
  53 by accessing device registers directly. \fBpm_raise_power\fR(9F) will be not be
  54 available until \fBattach\fR(9E). The framework ensures that the ancestors of
  55 the node being probed and all relevant platform-specific power management
  56 hardware is at full power at the time that \fBprobe()\fR is called.
  57 .sp
  58 .LP
  59 \fBprobe()\fR should only probe the device. It should not change any software
  60 state and should not create any software state. Device initialization should be
  61 done in \fBattach\fR(9E).
  62 .sp
  63 .LP
  64 For a self-identifying device, this entry point is not necessary. However, if a
  65 device exists in both self-identifying and non-self-identifying forms, a
  66 \fBprobe()\fR routine can be provided to simplify the driver.
  67 \fBddi_dev_is_sid\fR(9F) can then be used to determine whether  \fBprobe()\fR
  68 needs to do any work. See \fBddi_dev_is_sid\fR(9F) for an example.
  69 .SH RETURN VALUES
  70 .sp
  71 .ne 2
  72 .na
  73 \fB\fBDDI_PROBE_SUCCESS\fR \fR
  74 .ad
  75 .RS 23n
  76 If the probe was successful.
  77 .RE
  78 
  79 .sp
  80 .ne 2
  81 .na
  82 \fB\fBDDI_PROBE_FAILURE\fR \fR
  83 .ad
  84 .RS 23n
  85 If the probe failed.
  86 .RE
  87 
  88 .sp
  89 .ne 2
  90 .na
  91 \fB\fBDDI_PROBE_DONTCARE\fR \fR
  92 .ad
  93 .RS 23n
  94 If the probe was unsuccessful, yet \fBattach\fR(9E) should still be called.
  95 .RE
  96 
  97 .sp
  98 .ne 2
  99 .na
 100 \fB\fBDDI_PROBE_PARTIAL\fR \fR
 101 .ad
 102 .RS 23n
 103 If the instance is not present now, but may be present in the future.
 104 .RE
 105 
 106 .SH SEE ALSO
 107 .sp
 108 .LP
 109 \fBattach\fR(9E), \fBidentify\fR(9E), \fBddi_dev_is_sid\fR(9F),
 110 \fBddi_map_regs\fR(9F), \fBddi_peek\fR(9F), \fBddi_poke\fR(9F),
 111 \fBnulldev\fR(9F), \fBdev_ops\fR(9S)
 112 .sp
 113 .LP
 114 \fIWriting Device Drivers\fR
   1 '\" te
   2 .\" Copyright (c) 2000, Sun Microsystems, Inc.
   3 .\"  All Rights Reserved
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH PROBE 9E "February 15, 2020"
   8 .SH NAME
   9 probe \- determine if a non-self-identifying device is present
  10 .SH SYNOPSIS

  11 .nf
  12 #include <sys/conf.h>
  13 #include <sys/ddi.h>
  14 #include <sys/sunddi.h>
  15 
  16 
  17 
  18 \fBstatic int prefix\fR\fBprobe\fR(\fBdev_info_t *\fR\fIdip\fR);
  19 .fi
  20 
  21 .SH INTERFACE LEVEL


  22 Solaris DDI specific (Solaris DDI). This entry point is required for
  23 non-self-identifying devices.  You must write it for such devices. For
  24 self-identifying devices, \fBnulldev\fR(9F) should be specified in the
  25 \fBdev_ops\fR(9S) structure if a probe routine is not necessary.
  26 .SH ARGUMENTS

  27 .ne 2
  28 .na
  29 \fB\fIdip\fR \fR
  30 .ad
  31 .RS 8n
  32 Pointer to the device's \fBdev_info\fR structure.
  33 .RE
  34 
  35 .SH DESCRIPTION


  36 \fBprobe()\fR determines whether the device corresponding to \fIdip\fR actually
  37 exists and is a valid device for this driver. \fBprobe()\fR is called after
  38 \fBidentify\fR(9E) and before \fBattach\fR(9E) for a given \fIdip\fR. For
  39 example, the \fBprobe()\fR routine can map the device registers using
  40 \fBddi_map_regs\fR(9F) then attempt to access the hardware using
  41 \fBddi_peek\fR(9F) or \fBddi_poke\fR(9F) and determine if the device exists.
  42 Then the device registers should be unmapped using \fBddi_unmap_regs\fR(9F).
  43 .sp
  44 .LP
  45 To probe a device that was left powered off after the last \fBdetach()\fR, it
  46 might be necessary to power it up. If so, the driver must power up the device
  47 by accessing device registers directly. \fBpm_raise_power\fR(9F) will be not be
  48 available until \fBattach\fR(9E). The framework ensures that the ancestors of
  49 the node being probed and all relevant platform-specific power management
  50 hardware is at full power at the time that \fBprobe()\fR is called.
  51 .sp
  52 .LP
  53 \fBprobe()\fR should only probe the device. It should not change any software
  54 state and should not create any software state. Device initialization should be
  55 done in \fBattach\fR(9E).
  56 .sp
  57 .LP
  58 For a self-identifying device, this entry point is not necessary. However, if a
  59 device exists in both self-identifying and non-self-identifying forms, a
  60 \fBprobe()\fR routine can be provided to simplify the driver.
  61 \fBddi_dev_is_sid\fR(9F) can then be used to determine whether \fBprobe()\fR
  62 needs to do any work. See \fBddi_dev_is_sid\fR(9F) for an example.
  63 .SH RETURN VALUES

  64 .ne 2
  65 .na
  66 \fB\fBDDI_PROBE_SUCCESS\fR \fR
  67 .ad
  68 .RS 23n
  69 If the probe was successful.
  70 .RE
  71 
  72 .sp
  73 .ne 2
  74 .na
  75 \fB\fBDDI_PROBE_FAILURE\fR \fR
  76 .ad
  77 .RS 23n
  78 If the probe failed.
  79 .RE
  80 
  81 .sp
  82 .ne 2
  83 .na
  84 \fB\fBDDI_PROBE_DONTCARE\fR \fR
  85 .ad
  86 .RS 23n
  87 If the probe was unsuccessful, yet \fBattach\fR(9E) should still be called.
  88 .RE
  89 
  90 .sp
  91 .ne 2
  92 .na
  93 \fB\fBDDI_PROBE_PARTIAL\fR \fR
  94 .ad
  95 .RS 23n
  96 If the instance is not present now, but may be present in the future.
  97 .RE
  98 
  99 .SH SEE ALSO


 100 \fBattach\fR(9E), \fBidentify\fR(9E), \fBddi_dev_is_sid\fR(9F),
 101 \fBddi_map_regs\fR(9F), \fBddi_peek\fR(9F), \fBddi_poke\fR(9F),
 102 \fBnulldev\fR(9F), \fBdev_ops\fR(9S)
 103 .sp
 104 .LP
 105 \fIWriting Device Drivers\fR