I'm getting started in Linux Device Driver development for a PCI device connected via a laptop's PCIe expansion slot.
On boot, everything works beautifully. However, I'm trying to get basic Hotplug support online. When I eject the card, I can see (in dmesg
) that the proper remove stuff is called. However, when the card is re-inserted, nothing happens. If I manually remove the module, and then insert the card (or insert the card after boot), then I can see the module's init
is called, but not probe
. Also, the device doesn't appear in lspci
output.
However, if I echo 1 > /sys/bus/pci/rescan
then it appears in lspci
output, but the module fails to load with errors (pci_enable_device failed with code -22
).
Any ideas where to even start diagnosing this? The failure to exec .probe
is what's really puzzling me.
I should mention that this is an FPGA board connected here, so it's possible there's something wrong in the Device itself, but i would still expect probe to run and then fail with a weird error later.