liujun wrote:
when i use ddi_prop_op to give wwn property of device ,there has a coredump .
there maybe some bug in the ddi_prop_search_common which is called by ddi_prop_op ,

if property not exist in devi_drv_prop_ptr and evi_sys_prop_ptr is null


code is follow :

propp = i_ddi_prop_search(dev, name, flags,
                    &(DEVI(dip)->devi_drv_prop_ptr));
                if (propp == NULL)  {
                        propp = i_ddi_prop_search(dev, name, flags,
                            &(DEVI(dip)->devi_sys_prop_ptr));
                }
                if ((propp == NULL) && DEVI(dip)->devi_global_prop_list) {
                        propp = i_ddi_prop_search(dev, name, flags,
                            &DEVI(dip)->devi_global_prop_list->prop_list);
                }

                if (propp == NULL)  {
                        propp = i_ddi_prop_search(dev, name, flags,
                            &(DEVI(dip)->devi_hw_prop_ptr));
                }

Mabey there is some sequence required ,call you tell me how to get the wwn property of device

Hi Liu Jun,
what is the name of the property which you are searching
for? For fibrechannel a device's port- and node-wwns will
be reported as two properties:

node-wwn  and
port-wwn


Since you're operating in kernel code here, I assume that
you mean you get a panic when you try to print out a null
value for the property. Do I understand you correctly?


Surely it should be the case that if your search does not
find the appropriate property, then you don't try to print
it?

example::


propp = i_ddi_prop_search(dev, name, flags,
    &(DEVI(dip)->devi_drv_prop_ptr));

cmn_err(CE_NOTE, "wwn property is %s",
    ( (propp != NULL) ? propp : "(null)"));




cheers,
James C. McPherson
--
Solaris kernel software engineer
Sun Microsystems
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to