Date: Mon, 06 Apr 2015 16:11:07 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-current@freebsd.org Cc: Eran Harpaz <eharpaz@annapurnalabs.com> Subject: Re: How to hotplug pci/e devices in freeBSD? (Or How to remove and rescan/re-enumerate pci device?) Message-ID: <4602978.mfxsXe7cu8@ralph.baldwin.cx> In-Reply-To: <CAG%2BeEnW6nEgkALjfyFyfMLh_tp1Hza5sUjKWPs71xoP7oc93Ug@mail.gmail.com> References: <CAG%2BeEnW6nEgkALjfyFyfMLh_tp1Hza5sUjKWPs71xoP7oc93Ug@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, April 02, 2015 10:17:47 AM Eran Harpaz wrote: > I'm looking for a way to refresh/re-enumerate the pci device list. > > In Linux, you can remove a particular pci device, and then after preforming > a "rescan" the device will appear again. In Linux it is done by: > > echo 1 > /sys/bus/pci/devices/.../remove > echo 1 > /sys/bus/pci/rescan > > I'm looking for a similar functionality in freeBSD. > > *What do I want to achieve?* > > I'm using freeBSD and my pcie device can be reset from the host. But when > it boots again, it's uncommunicative, so I want to rescan the pci devices > in order to initiate a new connection between the host and the device. > > Any idea would be appreciated, even if it takes some coding effort. This is not currently supported. Hotplug support is being worked on by jmg@. However, if you want to rescan a non-hotplug device (e.g. flashing an FPGA board), then I can probably add extensions to devctl in HEAD to let you do this. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4602978.mfxsXe7cu8>