Christian Kaiser wrote:
>> Presumably, also, if you go look in /etc/devaliases you only see one 
>> entry for your driver?
> 
> I don't have such a file here.
> If you meant /etc/devlink.tab... yes.
>

No. Sorry, I mean /etc/driver_aliases

>> Is there a call to detach(9e) between the two attach(9e) calls or it 
>> is seemingly trying to attach instance #0 twice? If so, can you dump 
>> out the dip in each case to show it is the same one?
> 
> I implemented a dtrace script probing for attach:entry/return and detach 
> entry/return. Here is the output:
> 
> -----
> -bash-3.2# ./tmp/add_drv_dx.d
> dtrace: script './tmp/add_drv_dx.d' matched 4 probes
> CPU     ID                    FUNCTION:NAME
>   2  51363                  dx_attach:entry dip=0xffffff025f8b3488 
> 4068640106819
>               genunix`devi_attach+0x87
>               genunix`attach_node+0x123
>               genunix`i_ndi_config_node+0xe1
>               genunix`i_ddi_attachchild+0x67
>               genunix`devi_attach_node+0xfd
>               genunix`config_immediate_children+0xf2
>               genunix`devi_config_common+0x9f
>               genunix`mt_config_thread+0x5c
>               unix`thread_start+0x8
> 
>   2  51364                 dx_attach:return        4294967295 4068640317089
>   3  51363                  dx_attach:entry dip=0xffffff025f45e6e8 
> 4068634352380
>               genunix`devi_attach+0x87
>               genunix`attach_node+0x123
>               genunix`i_ndi_config_node+0xe1
>               genunix`i_ddi_attachchild+0x67
>               genunix`devi_attach_node+0xfd
>               genunix`config_immediate_children+0xf2
>               genunix`devi_config_common+0x9f
>               genunix`mt_config_thread+0x5c
>               unix`thread_start+0x8
> 
>   3  51364                 dx_attach:return                 0 4068668784309
> ^C
> ------
> 
> No, the dips are not equal. How can I found out which dip belongs to 
> which device node?
> 

Clearly your driver is binding to multiple devices; can you get your 
driver to print out the device path for each? Use ddi_pathname() to do 
this (it's not documented; look at the source to see how to use it).

   Paul
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to