PCIe re-enumation in linux driver question (pcie hotplug doesn't work)
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.