Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check PCIe bus rescan after loading bitstream. #36

Open
enjoy-digital opened this issue Jul 2, 2020 · 5 comments
Open

Check PCIe bus rescan after loading bitstream. #36

enjoy-digital opened this issue Jul 2, 2020 · 5 comments

Comments

@enjoy-digital
Copy link
Owner

It seems to be possible: https://stackoverflow.com/questions/32334870/how-to-do-a-true-rescan-of-pcie-bus but hasn't been tested.

@zyp
Copy link

zyp commented Jul 2, 2020

I've been doing this with the CLE-215+, works for me.

@enjoy-digital
Copy link
Owner Author

enjoy-digital commented Jul 2, 2020

@zyp thanks, indeed i also just tested it successfully on Ubuntu 18.04:

echo 1 | sudo tee /sys/bus/pci/devices/0000\:02\:00.0/remove
echo 1 | sudo tee /sys/bus/pci/rescan

@racerxdl
Copy link

@enjoy-digital I don't think it works on all machines though. Here the BAR doesn't get remmaped if I don't reboot. The device correctly get removed and when I issue rescan, they show up again, but it can't be used.

Here is a HP Server that I'm using to test it.

@smunaut
Copy link
Contributor

smunaut commented Apr 26, 2022

In case anyone is still looking for such info : doing a remove on the root bridge corresponding to that PCIe slot and then doing a rescan often works better because it forces reconfiguration of the memory zones being mapped / enabled through it.

@racerxdl
Copy link

racerxdl commented Jun 23, 2022

Just confirmed that it does work issuing a remove in root bridge as @smunaut pointed out.

Just need to be carefull for Allocated BAR size, which kernel doesnt always find a place to fit it. But it does correctly accept a new device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants