Hi All,
I am working on a program that can get the Configuration Space of all
PCI devices on AIX system.
First, I call 'lsdev -Cs pci' to get all PCI device names. Then I get
the parent and slot of PCI devices by ODM subroutines. For example,
ent0 is a PCI device, and its parent is pci8, slot is 16. Then I call
ioctl with MIOPCFGET command like this.

int slot = 16;
int fd = open("/dev/pci8", O_RDONLY);
if(fd >= 0){
MACH_DD_IO mddRecord;
struct PciCommonConfig cfgSpace;
memset(&cfgSpace, 0, sizeof(struct PciCommonConfig));

mddRecord.md_size = sizeof(struct PciCommonConfig);
mddRecord.md_incr = MV_BYTE;
mddRecord.md_data = (char*)&cfgSpace;
mddRecord.md_addr = 0;
mddRecord.md_sla = slot;

if(ioctl(fd, MIOPCFGET, &mddRecord) >= 0){
.....
}
}

The return code of ioctl is not less that zero, that is OK. while I
find the PciCommonConfig struture is filled with 0xff, not the real
data of the ent0.
I think it's mean that there's no device on slot 16. But why the
ODM(CuDv) tell me there is?
Thank you very much.