A device node (dev_info_t) has its properties in 3 linked lists: system properties: DEVI(dip)->devi_sys_prop_ptr hardware properties: DEVI(dip)->devi_hw_prop_ptr driver's custom properties: DEVI(dip)->devi_drv_prop_ptr
A driver's custom properties are in devi_drv_prop_ptr. A driver is supposed to call ddi_prop_remove_all() to remove all of its custom properties while detaching. S10 calls ddi_prop_remove_all() after calling the driver's detach routine, in case the driver forgets to do so. That seems to be the most relavent difference I've found so far between S10 & S9. See : http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/devcfg.c#1312 http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/sunddi.c#4478 Vincent. Chandra Gorentla wrote: > Hello All, > > I am facing a problem in running a kernel modules on Solaris 10, which > were working on Solaris 9. Following are my observations. > > A module calls 'ndi_devi_offline' to keep the device offline but does > not remove it. > The call is - 'ndi_devi_offline(dNode, 0);'. > > After this call another module tries to read the properties of this > node, using 'ddi_prop_lookup_int_array' which is failing. This call > is to to find the 'dev_info_t' of the node. This module, then removes > the node by calling 'ndi_devi_offline( tmpDI, NDI_DEVI_REMOVE );'. > > As the property read call fails, the module can not get the > 'dev_info_t' value hence can not remove the node. > > Is the 'ndi_devi_offline' is supposed to differ like this between > 'Solaris 10' and 'Solaris 9'? > Is there any work around to my probelm? > > Currently, the second module reads a particular property (by > 'ddi_prop_lookup_int_array') of all the node starting from the root. > If the property value matches with the property values the module is > looking for, then this is the required 'dev_info_t'. The value of > 'dev_info_t' found in this way is used to NDI_DEVI_REMOVE the node. > On Solaris 10, the 'ddi_prop_lookup_int_array' call is failing for the > node for which 'ndi_devi_offline(dNode, 0);' was called but the node > is still exists (after this call) in the tree (not removed). > > Thanks and regards, > chandra > _______________________________________________ > driver-discuss mailing list > driver-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/driver-discuss > _______________________________________________ driver-discuss mailing list driver-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/driver-discuss