why pci_attach_device() dosen't work?

hi, I am working on a pci device driver. I am using QNX 6.3 os

my main function works at beginning as follows:
1.attach pci driver
2.detect and attatch the device using pci_attach_device()
3.read the pci configuration using pci_read_config()
4.detach device
5.detach pci sever

my problem is:
the function can be run in the past,but it return a error of"no such device" when calling the pci_attach_device()function now.

please help me in this regard

Regards
wanngxueli

If you use pci -v does your device still show. I’m guessing it’s not.

I have used pci -v to show the infomation.It have the device.
I also used the pci_find_device() to find the pci-card,it can be find.But can’t run the pci_attach_device().

i hear my colleague say that the problem can be resolved by change the parameters in BIOS.But he isn’t sure what should we do. Please tell me what i should do,thanks very much!!!