Page 1 of 1

Obtain 'Bus Device Funct.' of PCI slot

Posted: Mon Sep 12, 2016 10:51 pm
by javierdlr
Hi how can I get 'Bus: 0x00 Device: 0x04 Function: 0x00' alas shown in Ranger or showconfig?

Is it one if the 'enum enPCIConfigSpace' tag? Os I can query like 'dev->ReadConfigWord()/Byte()'

Right now I have (Slot values are always 0, just plain printf("00:00:00")):

Code: Select all

#lspci v
##  Ven   Dev  Description
02 1095  3114  Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller 
    IOBase   : 0:0x00001000; 1:0x00001008; 2:0x00001010; 3:0x00001018; 4:0x00001020; 5:0x80000000
    Slot     : 00:00:00
    Class    : Base:0x01  Sub:0x04  IFace:0x00
    Revision : 0x02
    Interrupt: Line:0x20  Pin:0x01
...

Re: Obtain 'Bus Device Funct.' of PCI slot

Posted: Mon Sep 12, 2016 11:18 pm
by javierdlr
Answering myself:

Using 'dev->GetAddress(&bus,&devi,&func);' then I get such values a wanted

THX ;-)