Hopefully there are some devfs experts around that can help me grok 
whatever is going on.

I have a nexus driver that that has a SCSI bus (emulated) underneath it, 
with a single emulated disk drive.

The minor nodes for the disk device node looks like:

/devices/[EMAIL PROTECTED],0/pci8086,[EMAIL PROTECTED]/pci1179,[EMAIL 
PROTECTED],3/[EMAIL PROTECTED]/[EMAIL PROTECTED],0:u,raw

Now, what I'm finding is that if I try to open one of these nodes right 
after attach, open(2) returns ENOENT.  Not very useful.  The disk nodes 
are handled by the sd(7d) driver.

*However*, if I cause an opendir/readdir cycle on the sdcard nexus, by 
doing this command:

echo /devices/[EMAIL PROTECTED],0/pci8086,[EMAIL PROTECTED]/pci1179,[EMAIL 
PROTECTED],3/[EMAIL PROTECTED]/*

Then everything starts working.  Clearly something is wrong.  But 
unfortunately it is entirely *unclear* what I'm doing wrong here.  One 
(or at least me) would expect that the nodes would be immediately 
accessible after ddi_create_minor_node().  I'm a bit new to writing 
nexus drivers that support hotplug, so its possible that there is 
something I'm doing wrong... the USB implementation is about as clear as 
mud.    For reference, here's what my code does:

sdhost (parent nexus, think ohci) does ndi_devi_alloc(), sets some 
properties, and calls ndi_devi_online(dip, NDI_ONLINE_ATTACH) for the 
sdcard node.

sdcard (2nd level nexus, think scsa2usb) does ndi_devi_alloc(), updates 
properties, and calls ndi_devi_online(dip, NDI_ONLINE_ATTACH) for the 
disk node (which has the "sd" driver bound to it.

I can cetainly watch ddi_create_minor_node() get called by 
sd_unit_attach(), so I think the problem is somewhere in devfs/dev 
layer.   Any advice would be much appreciated.

    -- Garrett



_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to