[Ilugc] pci slot mappings in Linux

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Tue Mar 25 05:53:51 2008

On 01:27:12 Mar 25, Balu manyam wrote:

Hey folks -- Is there any reliable way to map PCI slot to device names in
Linux - that is given ethN I am trying to map it to phisical location in the
server - its been a long standing problem for me ..... especially if the
server has different varieties of chipsets installed (broadcom,intel,etc) --
i am looking for this to actually make sure the drivers are attaching
corrrectly .......

For example to do this in solaris - I would do a 'grep bgeNN
/etc/path_to_inst' #for the bge chipset and lookup the hardware adress in
sun site..........to identify the slot #



What could be the need for doing such a thing?

PCI has been a plug and play bus for years now. And newer versions viz
PCI-e and PCI-X are going to be even more easy.

Why do you want to manually figure out the PCI slot?

All that a driver needs in the PCI world are three things.

a) PCI device number
b) PCI function number
c) PCI bus number (Usually this is just 0)

Anyway to answer your question

#lspci -v -v |grep Ethernet

should get you what you want.

-Girish

Other related posts: