On Sun, Apr 11, 2010 at 11:31 AM, 邓宁 <[email protected]> wrote:
>
> I have written a device named sample_pci_device by dml description language
> in Simics. After booting the solaris system, the newly added pci device is
> listed when I input the prtconf -D command at the prompt.
>
> Here is the item:
> ...
> pci, instance #1(driver name: pcisch)
> pci104c, ac10 #104c is the vendor_id while ac10
> is the device _id.
> ...
> I followed the instructions in "Binding a Driver to a Device" to bind a
> simple driver to the device. There are two files in the spm driver
> directory:spm.c and spm.conf. In my spm.conf file, the device name and
> parent is as follows:
>
> name="pci104c" parent="pseudo";
>
> I met some problem when add-drv the driver to the system:
>
> ...init_spec_child: parent=pseudo, bad spec(pc104c)
> ...init_spec_child: parent=zconsnex, bad spec(pci104c)
> devfsadm: driver failed to attach:spm
> Warning: Driver (spm) successfully added to system but failed to attach
>
> I know it is the reason of .conf file that makes the mistake. Can you tell
> me how to write a configuration file in solaris to bind my driver with the
> device?
> --
You do not have to have .conf file for a pci driver, since the PCI
nexus driver will create all the necessary properties.
You only need one if you want to supply additional (i.e. non-hardware)
properties.
What you need is to run (assuming your driver is called spm)
add_drv -i '"pci104c,ac10"' spm
Note, there is a double quoted device name wrapped with single quote.
--
Regards,
Cyril
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss