Relative Content

Tag Archive for clinuxdriverpci

Linux PCI express device driver segfault on remove

I have device controlled by NXP LS1043 64-bit ARM core CPU. Custom board. CPU connected via PCI 3.0 x 1 (2.5GT/s) to FPGA.
On cold start CPU loaded without PCI device on FPGA side, flash FPGA and bring-up PCI driver. For first try – it working properly.
Next, I reset FPGA and re-flash firmware. PCI link at this time physically DOWN, logically – not changed (if I do /sys/bus/pci/rescan – device respond that all OK, but it is not true (FPGA in reset state)).
After FPGA re-start, I user /sys/bus/pci/devices/%dev_num%/remove; /sys/bus/pci/rescan – to restart kernel driver and it working properly.