Paul Durrant wrote:
> Steven Stallion wrote:
>   
>> Does anyone know offhand how to grab a string representation of a driver
>> alias (i.e. "pci1027,00ab") at runtime? Currently this is being used in
>> some debugging in probe(9E) and its rather hackish to cmn_err
>> \"pci%x,%x\".
>>
>>     
>
> You could try ddi_node_name(dip)
>   

I find ddi_node_name() to be pretty useless.  That's because firmware 
often assigns "generic" names to nodes in the device tree.  For example, 
"ethernet" is a common node name on SPARC systems -- and is used for 
nodes that have very different device drivers.  (The firmware looks at 
the PCI class to make the name in some instances.)  ddi_binding_name() 
is more useful if you want the alias used to bind the driver, and 
ddi_driver_name() is probably more useful in other places.  (driver and 
instance number are unique.)

    -- Garrett
>    Paul
> _______________________________________________
> driver-discuss mailing list
> driver-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/driver-discuss
>   

_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to