[geeks] determining physical slot of PCI device

Shannon Hendrix shannon at widomaker.com
Thu Mar 27 16:13:20 CDT 2008


Does anyone know how, particularly in FreeBSD, to find out what  
physical slot a particular PCI card is plugged into?

The situation is this:

I create custom OS for embedded PC "appliance" servers and the end  
user configures them based on physical network ports.

We have configurations where the only difference is the network cards  
installed in the machine, so it sucks to have multiple configuration  
files and builds just because of that.

Therefore we would like to find a deterministic way of numbering the  
ports based on physical order so we can number the chassis and not  
worry about how many cards are installed: the numbers will match up  
and the customers will be happy.

I've tried pciconf, but it only shows logical ordering and  
addressing.  It doesn't seem able to show physical slots.

Is there some other information I could use so that an algorithm could  
automatically map the network ports on a machine in a consistent order?

Any ideas at all?



-- 
"Where some they sell their dreams for small desires."



More information about the geeks mailing list