On Wed, May 29, 2019 at 01:49:42PM +0300, Mika Westerberg wrote: > PCIe root and downstream ports have link control register that can be > used disable the link from software. This can be useful for instance > when performing "software" hotplug on systems that do not support real > PCIe/ACPI hotplug. > > For example when used with FPGA card we can burn a new FPGA image > without need to reboot the system. > > First we remove the FGPA device from Linux PCI stack: > > # echo 1 > /sys/bus/pci/devices/0000:00:01.1/0000:02:00.0/remove > > Then we disable the link: > > # echo 1 > /sys/bus/pci/devices/0000:00:01.1/link_disable > > By doing this we prevent the kernel from accessing the hardware while we > burn the new FPGA image. Once the new FPGA is burned we can re-enable > the link and rescan the new and possibly different device: > > # echo 0 > /sys/bus/pci/devices/0000:00:01.1/link_disable > # echo 1 > /sys/bus/pci/devices/0000:00:01.1/rescan > > Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> Hi, Any comments on this?