LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   PCIe re-enumation in linux driver question (pcie hotplug doesn't work) (http://www.linuxquestions.org/questions/programming-9/pcie-re-enumation-in-linux-driver-question-pcie-hotplug-doesnt-work-796115/)

blavo 03-17-2010 05:00 PM

PCIe re-enumation in linux driver question (pcie hotplug doesn't work)
 
I'm working on a system where a PCIe endpoint comes on-line after my Linux OS is up and running. I'm finding that the device is not recognized even though I have PCIe hotplug enabled in the "make menuconfig" option.

I'm trying to figure out how to re-enumerate the PCIe bus to get it find and initialize the endpoint.

I've been doing some websearching, but I haven't found anything useful.

Any help is greatly appreciated.

Thanks

Sergei Steshenko 03-17-2010 05:05 PM

Quote:

Originally Posted by blavo (Post 3902314)
I'm working on a system where a PCIe endpoint comes on-line after my Linux OS is up and running. I'm finding that the device is not recognized even though I have PCIe hotplug enabled in the "make menuconfig" option.

I'm trying to figure out how to re-enumerate the PCIe bus to get it find and initialize the endpoint.

I've been doing some websearching, but I haven't found anything useful.

Any help is greatly appreciated.

Thanks

Well, any modern Linux distro (say, "my" SUSE) has a way to rescan hardware - in SUSE it can be done from control center. So, had I faced this problem, I would have started from looking into the code of this HW rescan feature.

...

Have you tried starting from here: http://wiki.linuxquestions.org/wiki/Discover ?

blavo 03-17-2010 09:05 PM

I'll look into this feature to see if I can locate the code that drives it.

Thanks

Sergei Steshenko 03-17-2010 09:22 PM

Quote:

Originally Posted by blavo (Post 3902559)
I'll look into this feature to see if I can locate the code that drives it.

Thanks

By the way, the latest PCIE standard is about 700 pages long :).

anand_dk1 11-22-2011 07:00 AM

Solution ?
 
Quote:

Originally Posted by blavo (Post 3902559)
I'll look into this feature to see if I can locate the code that drives it.

Thanks

Hi Guys,
Did you work out, how to get the driver to know about availability of new endpoint on the PCIe slots ?

Thanks
Anand

physkael 08-02-2012 03:12 PM

PCI / PCIe bus rescan in Linux
 
I'm developing a PCIe card and just recently stumbled on this problem. I looked in the kernel documentation on the /sys filesystem and discovered that typing
echo 1 > /sys/bus/pci/rescan
will force a PCI bus rescan. By the way one can also enable a PCI / PCIe device from userspace by typing
echo 1 > /sys/bus/pci/devices/xxxx:yy.zz/enable
which appears to have the same effect as the pci_enable function you might use in a PCI device driver.


All times are GMT -5. The time now is 03:11 PM.