1ddi_dev_is_sid(9F)       Kernel Functions for Drivers       ddi_dev_is_sid(9F)
2
3
4

NAME

6       ddi_dev_is_sid - tell whether a device is self-identifying
7

SYNOPSIS

9       #include <sys/conf.h>
10       #include <sys/ddi.h>
11       #include <sys/sunddi.h>
12
13
14
15       int ddi_dev_is_sid(dev_info_t *dip);
16
17

INTERFACE LEVEL

19       Solaris DDI specific (Solaris DDI).
20

PARAMETERS

22       dip    A pointer to the device's dev_info structure.
23
24

DESCRIPTION

26       The  ddi_dev_is_sid()  function  tells  the  caller  whether the device
27       described by dip is  self-identifying,  that  is,  a  device  that  can
28       unequivocally  tell the system that it exists. This is useful for driv‐
29       ers that support both a self-identifying as well as a  non-self-identi‐
30       fying variants of a device (and therefore must be probed).
31

RETURN VALUES

33       DDI_SUCCESS    Device is self-identifying.
34
35
36       DDI_FAILURE    Device is not self-identifying.
37
38

CONTEXT

40       The  ddi_dev_is_sid()  function  can be called from user, interrupt, or
41       kernel context.
42

EXAMPLES

44         1   ...
45         2   int
46         3   bz_probe(dev_info_t *dip)
47         4   {
48         5    ...
49         6    if (ddi_dev_is_sid(dip) == DDI_SUCCESS) {
50         7         /*
51         8          * This is the self-identifying version (OpenBoot).
52         9          * No need to probe for it because we know it is there.
53         10         * The existence of dip && ddi_dev_is_sid() proves this.
54         11         */
55         12             return (DDI_PROBE_DONTCARE);
56         13   }
57         14   /*
58         15    * Not a self-identifying variant of the device. Now we have to
59         16    * do some work to see whether it is really attached to the
60         17    * system.
61         18    */
62         19  ...
63
64

SEE ALSO

66       probe(9E) Writing Device Drivers
67
68
69
70SunOS 5.11                        16 Jan 2006               ddi_dev_is_sid(9F)
Impressum