How can the linux kernel be forced to enumerate the PCI-e bus?

reign_man picture reign_man · Sep 13, 2012 · Viewed 54.9k times · Source

Linux kernel 2.6

I've got an fpga that is loaded over GPIO connected to a development board running linux. The fpga will transmit and receive data over the pci-express bus. However, this is enumerated at boot and as such, no link is discovered (because the fpga is not loaded at boot).

How can I force re-enumeration of the pci-e bus in linux? Is there a simple command or will I have to make kernel changes? I need the capability to hotplug pcie devices.

Answer

user1202136 picture user1202136 · Sep 14, 2012

As root, try the following command:

echo "1" > /sys/bus/pci/rescan

See this link for more information: http://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-pci