HELP: Need to determine physical slot number of card in PCIe slot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I apologize if this is not the right place to ask this question.  I
have done some googling around, and I have not found an answer to
this, although I suspect I'm just not using the right search terms. 
Also, I'm not a member of this list, so please CC me if you reply.

I have put together a diagnostic system for my employer using a
stripped-down Gentoo system (2.6.15 kernel).  We're testing some PCIe
cards on an ABIT IL8, which has four PCIe slots.  Since this is a test
rig, when a card fails a test, we need to know which of the four slots
the card is in.  When developing this, I had assumed that the PCI bus
ID would be a function of the slot number, but apparently, it is not. 
We can put one card into any of the four slots, and we get the same
bus ID.  If we put in four cards, we get a set of ID numbers that
isn't sequential.

I've poked around in /proc, without finding anything.  I found
/sys/bus/pci_express, but it's really weird what I see, because it
shows what appears to be some slots repeated and some missing, and
also, there doesn't seem to be a way to associate the slot with the
bus ID  (I assume pcie00 is slot zero).  Under /sys/bus/pci/devices, I
do see the PCI bus ID of the cards in question, but I cannot figure
out how to associate that with the slot number.  The directory
/sys/bus/pci/slots is empty.

Is there some reasonable way for me to be able to determine, given a
bus ID, which physical slot the PCIe card is in?

Note:  I am not using a kernel driver for these cards.  I'm using
/dev/mem to map mmio, and I'm using libpci to access PCI config space.
 Everything works great (besides the slot number issue here).

Thank you very much in advance for your help.


--- Timothy Miller
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux