I made device driver for PCI express card, and tried to install
on SPARC Enterprise T5220 (Solaris10).
I compiled mydrv by following command.
# cc -c -xO2 -m64 mydrv.c
# ld -r -o mydrv mydrv.o
I copied mydrv to /usr/kernel/drv/sparcv9, and executed add_drv command as follows.
# add_drv -v -m"* 0666 root root" -i'"pciVVV,DDDD"' mydrv
exit status = 0
devfsadm: driver failed to attach: jjy
exit status = 1
Warning: Driver (mydrv) successfully added to system but failed to attach
Driver (mydrv) installed.
But my attach function never called by system.
(I made sure this, by cmn_err function.)
Attach function was called successfully on T5220.
I changed configuration data as follows.
Class code: 5 --> 7
And then, device identification name displayed by prtconf changed as follows.
"memory" --> "pciexVVVV,DDDD"
I executed add_drv command with option -i'"pciexVVVV,DDDD"', not "pciVVVV,DDDD".
Now driver is working well.