From 8fea36aa81195d758a29067141afdc4becefe5ae Mon Sep 17 00:00:00 2001 From: Steven Koo Date: Thu, 24 Sep 2020 13:05:34 -0500 Subject: lib: disable non pcie types in find with resource mpmd find doesn't respect the "resource" arg hint and can be detected when "resource" is set. This results in incorrect device selection when using PCIe. This change adds detection for "resource" as a prefix in the device hints for mpmd and the other devices. --- host/lib/usrp/mpmd/mpmd_find.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'host/lib/usrp/mpmd/mpmd_find.cpp') diff --git a/host/lib/usrp/mpmd/mpmd_find.cpp b/host/lib/usrp/mpmd/mpmd_find.cpp index c08e23fa7..77f7486dd 100644 --- a/host/lib/usrp/mpmd/mpmd_find.cpp +++ b/host/lib/usrp/mpmd/mpmd_find.cpp @@ -224,6 +224,12 @@ device_addrs_t mpmd_find(const device_addr_t& hint_) return {}; } } + if (hint_.has_key_with_prefix("resource")) { + UHD_LOG_TRACE( + "MPMD FIND", "Returning early, PCIe is not support with mpm devices."); + return {}; + } + UHD_LOG_TRACE("MPMD FIND", "Finding with " << hints.size() << " different hint(s)."); // Scenario 1): User gave us at least one address -- cgit v1.2.3