Paul Durrant wrote: > 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 >
-bash-3.2# grep 9902 /etc/driver_aliases dis_dx "pci9902,101" >>> 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). OK... you solved my problem! Thank you! Oct 16 14:29:07 linden-5 dis_dx: [ID 433334 kern.notice] attaching instance 0, pathname=/[EMAIL PROTECTED],0/pci8086,[EMAIL PROTECTED]/pci9902,[EMAIL PROTECTED] [...] Oct 16 14:29:07 linden-5 dis_dx: [ID 433334 kern.notice] attaching instance 0, pathname=/pseudo/[EMAIL PROTECTED] I didn't even think about that I still have the driver configuration file lying around with an entry like this: name="dis_dx" parent="pseudo" That came from my very early days in developing this driver when I read SUN's "Device Driver Tutorial". I removed that line and everything seems fine now! Thanks again Paul! Christian -- Christian Kaiser, Software Engineer, Dolphin Interconnect Solutions http//www.dolphinics.com _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code