PCI bus filter driver

Hi
I saw some threads about the same topic but i still have some problem.
I need to update PCI register for PCI-to-PCI Express Bridge under windows xp (pci.sys). I wrote pci bus filter driver and trying to implement IRP_MN_QUERY_INTERFACE in order to get the ReadConfig/WriteConfig functions but when i cal IoCallDriver the call comes into my driver and as a result the BusInterface is empty. I’m using NextLayerDriver device object pointer. Any ideas why this is happened?
I heard that i may be i’m not handling properly IRP_MN_QUERY_DEVICE_RELATIONS, but what exactly should be there.
If somebody can publish some sample code, would be very appreciated.
Thank you
Alex