ndi_devi_offline and ddi_prop_lookup_int_array - Solaris 10


 
Thread Tools Search this Thread
Operating Systems Solaris ndi_devi_offline and ddi_prop_lookup_int_array - Solaris 10
# 1  
Old 07-21-2008
ndi_devi_offline and ddi_prop_lookup_int_array - Solaris 10

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
# 2  
Old 07-21-2008
What is the return code from the ddi_prop_lookup_int_array ?

it sould be one of:

DDI_PROP_INVAL_ARG
DDI_PROP_NOT_FOUND
DDI_PROP_UNDEFINED
DDI_PROP_CANNOT_DECODE
# 3  
Old 07-28-2008
Hello Reborg,


The call 'ddi_prop_lookup_int_array' after the 'ndi_devi_offline(dNode, 0)' returning 1 (= DDI_PROP_NOT_FOUND). But the node still exists in the tree. It seems that 'ndi_devi_offline' call (when called with flags argument as '0') is setting the 'devi_global_prop_list' field of 'struct dev_info' to NULL. This is not the case in Solaris < 10, which is why the driver works fine on Solaris 9.

Is it an expected behavior on Solaris 10? Is there any work around for this problem?

Best regards,
chandra
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Solaris

Patching Procedure in Solaris 10 with sun cluster having Solaris zone

Hi Gurus I am not able to find the patching procedure for solaris 10 ( sol10 u11) to latest patchset with sun cluster having failover zones so that same I should follow. Take an instance, there are sol1 and sol2 nodes and having two failover zones like sozone1-rg and sozone2-rg and currently... (1 Reply)
Discussion started by: nick101
1 Replies

2. Solaris

How to add Solaris text console to Solaris grub2 menu?

Hi, I am new to sloaris and just instlled the solaris 11.2, i know little more about linux, i open the /boot/grub/grub.cfg in solaris and there is many other entries forl solaris 11.2 one of them is for 'Oracle Solaris 11.2 text console' but at boot grub2 only show the first default entry that... (1 Reply)
Discussion started by: shamsat
1 Replies

3. Solaris

root disk mirroring in solaris volume manager for solaris 10

Need a procedure document to do "root disk mirroring in solaris volume manager for solaris 10". I hope some one will help me asap. I need to do it production environment. Let me know if you need any deatils on this. Thanks, Rama (1 Reply)
Discussion started by: ramareddi16
1 Replies

4. Solaris

Unable to login using ssh,telnet onto my solaris machine with solaris 10 installed

Hi, I am unable to login into my terminal hosting Solaris 10 and get the below error message "Server refused to allocate pty ld.so.1: sh: fatal: libc.so.1: open failed: No such file or directory " Is there anyways i can get into my machine and what kind of changes are required to be... (7 Replies)
Discussion started by: sankasu
7 Replies
Login or Register to Ask a Question