diff --git a/common/include/villas/kernel/devices/pci_device.hpp b/common/include/villas/kernel/devices/pci_device.hpp index b62595202..8f6a10cf5 100644 --- a/common/include/villas/kernel/devices/pci_device.hpp +++ b/common/include/villas/kernel/devices/pci_device.hpp @@ -62,6 +62,7 @@ struct Region { class PciDevice : public Device { private: + static constexpr char PROBE_DEFAULT[] = "/sys/bus/pci/drivers_probe"; static constexpr char OVERRIDE_DEFAULT[] = "driver_override"; public: @@ -79,11 +80,11 @@ public: std::string name() const override; std::filesystem::path override_path() const override; std::filesystem::path path() const override; + void probe() const override; // Bind a new LKM to the PCI device bool attachDriver(const std::string &driver) const; - std::list getRegions() const; // Write 32-bit BAR value from to the PCI configuration space diff --git a/common/lib/kernel/devices/pci_device.cpp b/common/lib/kernel/devices/pci_device.cpp index 6f2161f3f..425c2ee3b 100644 --- a/common/lib/kernel/devices/pci_device.cpp +++ b/common/lib/kernel/devices/pci_device.cpp @@ -485,3 +485,7 @@ std::filesystem::path PciDevice::override_path() const { return this->path() / OVERRIDE_DEFAULT; } + +void PciDevice::probe() const { + write_to_file(this->name(), this->PROBE_DEFAULT); +}