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/usrp2/usrp2_impl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp') diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index c2514ae02..8ca503aa9 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -68,8 +68,11 @@ device_addrs_t usrp2_find(const device_addr_t& hint_) // Return an empty list of addresses when a resource is specified, // since a resource is intended for a different, non-USB, device. - if (hint.has_key("resource")) + if (hint.has_key_with_prefix("resource")) { + UHD_LOG_TRACE( + "USRP2 FIND", "Returning early, PCIe is not supported with usrp2 devices."); return usrp2_addrs; + } // if no address was specified, send a broadcast on each interface if (not hint.has_key("addr")) { -- cgit v1.2.3